Skip to content

Commit 336bac5

Browse files
riteshharjanibrauner
authored andcommitted
Documentation: iomap: Add missing flags description
Let's document the use of these flags in iomap design doc where other flags are defined too - - IOMAP_F_BOUNDARY was added by XFS to prevent merging of I/O and I/O completions across RTG boundaries. - IOMAP_F_ATOMIC_BIO was added for supporting atomic I/O operations for filesystems to inform the iomap that it needs HW-offload based mechanism for torn-write protection. While we are at it, let's also fix the description of IOMAP_F_PRIVATE flag after a recent: commit 923936e ("iomap: Fix conflicting values of iomap flags") Signed-off-by: "Ritesh Harjani (IBM)" <[email protected]> Link: https://lore.kernel.org/8d8534a704c4f162f347a84830710db32a927b2e.1744432270.git.ritesh.list@gmail.com Reviewed-by: "Darrick J. Wong" <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent 0af2f6b commit 336bac5

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

Documentation/filesystems/iomap/design.rst

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,25 @@ The fields are as follows:
243243
regular file data.
244244
This is only useful for FIEMAP.
245245

246-
* **IOMAP_F_PRIVATE**: Starting with this value, the upper bits can
247-
be set by the filesystem for its own purposes.
246+
* **IOMAP_F_BOUNDARY**: This indicates I/O and its completion must not be
247+
merged with any other I/O or completion. Filesystems must use this when
248+
submitting I/O to devices that cannot handle I/O crossing certain LBAs
249+
(e.g. ZNS devices). This flag applies only to buffered I/O writeback; all
250+
other functions ignore it.
251+
252+
* **IOMAP_F_PRIVATE**: This flag is reserved for filesystem private use.
248253

249254
* **IOMAP_F_ANON_WRITE**: Indicates that (write) I/O does not have a target
250255
block assigned to it yet and the file system will do that in the bio
251256
submission handler, splitting the I/O as needed.
252257

258+
* **IOMAP_F_ATOMIC_BIO**: This indicates write I/O must be submitted with the
259+
``REQ_ATOMIC`` flag set in the bio. Filesystems need to set this flag to
260+
inform iomap that the write I/O operation requires torn-write protection
261+
based on HW-offload mechanism. They must also ensure that mapping updates
262+
upon the completion of the I/O must be performed in a single metadata
263+
update.
264+
253265
These flags can be set by iomap itself during file operations.
254266
The filesystem should supply an ``->iomap_end`` function if it needs
255267
to observe these flags:

0 commit comments

Comments
 (0)