Skip to content

Commit 406331a

Browse files
committed
Merge patch series "Documentation: iomap: Add missing flags description"
Add missing flag descriptions to documentation. * patches from https://lore.kernel.org/8d8534a704c4f162f347a84830710db32a927b2e.1744432270.git.ritesh.list@gmail.com: iomap: trace: Add missing flags to [IOMAP_|IOMAP_F_]FLAGS_STRINGS Documentation: iomap: Add missing flags description Link: https://lore.kernel.org/8d8534a704c4f162f347a84830710db32a927b2e.1744432270.git.ritesh.list@gmail.com Signed-off-by: Christian Brauner <[email protected]>
2 parents 0af2f6b + d1253c6 commit 406331a

File tree

2 files changed

+35
-8
lines changed

2 files changed

+35
-8
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:

fs/iomap/trace.h

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,26 @@ DEFINE_RANGE_EVENT(iomap_dio_rw_queued);
9999
{ IOMAP_FAULT, "FAULT" }, \
100100
{ IOMAP_DIRECT, "DIRECT" }, \
101101
{ IOMAP_NOWAIT, "NOWAIT" }, \
102-
{ IOMAP_ATOMIC, "ATOMIC" }
102+
{ IOMAP_OVERWRITE_ONLY, "OVERWRITE_ONLY" }, \
103+
{ IOMAP_UNSHARE, "UNSHARE" }, \
104+
{ IOMAP_DAX, "DAX" }, \
105+
{ IOMAP_ATOMIC, "ATOMIC" }, \
106+
{ IOMAP_DONTCACHE, "DONTCACHE" }
103107

104108
#define IOMAP_F_FLAGS_STRINGS \
105109
{ IOMAP_F_NEW, "NEW" }, \
106110
{ IOMAP_F_DIRTY, "DIRTY" }, \
107111
{ IOMAP_F_SHARED, "SHARED" }, \
108112
{ IOMAP_F_MERGED, "MERGED" }, \
109113
{ IOMAP_F_BUFFER_HEAD, "BH" }, \
110-
{ IOMAP_F_SIZE_CHANGED, "SIZE_CHANGED" }
114+
{ IOMAP_F_XATTR, "XATTR" }, \
115+
{ IOMAP_F_BOUNDARY, "BOUNDARY" }, \
116+
{ IOMAP_F_ANON_WRITE, "ANON_WRITE" }, \
117+
{ IOMAP_F_ATOMIC_BIO, "ATOMIC_BIO" }, \
118+
{ IOMAP_F_PRIVATE, "PRIVATE" }, \
119+
{ IOMAP_F_SIZE_CHANGED, "SIZE_CHANGED" }, \
120+
{ IOMAP_F_STALE, "STALE" }
121+
111122

112123
#define IOMAP_DIO_STRINGS \
113124
{IOMAP_DIO_FORCE_WAIT, "DIO_FORCE_WAIT" }, \
@@ -138,15 +149,17 @@ DECLARE_EVENT_CLASS(iomap_class,
138149
__entry->bdev = iomap->bdev ? iomap->bdev->bd_dev : 0;
139150
),
140151
TP_printk("dev %d:%d ino 0x%llx bdev %d:%d addr 0x%llx offset 0x%llx "
141-
"length 0x%llx type %s flags %s",
152+
"length 0x%llx type %s (0x%x) flags %s (0x%x)",
142153
MAJOR(__entry->dev), MINOR(__entry->dev),
143154
__entry->ino,
144155
MAJOR(__entry->bdev), MINOR(__entry->bdev),
145156
__entry->addr,
146157
__entry->offset,
147158
__entry->length,
148159
__print_symbolic(__entry->type, IOMAP_TYPE_STRINGS),
149-
__print_flags(__entry->flags, "|", IOMAP_F_FLAGS_STRINGS))
160+
__entry->type,
161+
__print_flags(__entry->flags, "|", IOMAP_F_FLAGS_STRINGS),
162+
__entry->flags)
150163
)
151164

152165
#define DEFINE_IOMAP_EVENT(name) \
@@ -185,7 +198,7 @@ TRACE_EVENT(iomap_writepage_map,
185198
__entry->bdev = iomap->bdev ? iomap->bdev->bd_dev : 0;
186199
),
187200
TP_printk("dev %d:%d ino 0x%llx bdev %d:%d pos 0x%llx dirty len 0x%llx "
188-
"addr 0x%llx offset 0x%llx length 0x%llx type %s flags %s",
201+
"addr 0x%llx offset 0x%llx length 0x%llx type %s (0x%x) flags %s (0x%x)",
189202
MAJOR(__entry->dev), MINOR(__entry->dev),
190203
__entry->ino,
191204
MAJOR(__entry->bdev), MINOR(__entry->bdev),
@@ -195,7 +208,9 @@ TRACE_EVENT(iomap_writepage_map,
195208
__entry->offset,
196209
__entry->length,
197210
__print_symbolic(__entry->type, IOMAP_TYPE_STRINGS),
198-
__print_flags(__entry->flags, "|", IOMAP_F_FLAGS_STRINGS))
211+
__entry->type,
212+
__print_flags(__entry->flags, "|", IOMAP_F_FLAGS_STRINGS),
213+
__entry->flags)
199214
);
200215

201216
TRACE_EVENT(iomap_iter,

0 commit comments

Comments
 (0)