Skip to content

Commit adc9c2e

Browse files
author
Darrick J. Wong
committed
iomap: add a tracepoint for mappings returned by map_blocks
Add a new tracepoint so we can see what mapping the filesystem returns to writeback a dirty page. Signed-off-by: Darrick J. Wong <[email protected]> Reviewed-by: Dave Chinner <[email protected]>
1 parent 3d5f3ba commit adc9c2e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

fs/iomap/buffered-io.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,7 @@ iomap_writepage_map(struct iomap_writepage_ctx *wpc,
13601360
error = wpc->ops->map_blocks(wpc, inode, pos);
13611361
if (error)
13621362
break;
1363+
trace_iomap_writepage_map(inode, &wpc->iomap);
13631364
if (WARN_ON_ONCE(wpc->iomap.type == IOMAP_INLINE))
13641365
continue;
13651366
if (wpc->iomap.type == IOMAP_HOLE)

fs/iomap/trace.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ DEFINE_EVENT(iomap_class, name, \
148148
TP_ARGS(inode, iomap))
149149
DEFINE_IOMAP_EVENT(iomap_iter_dstmap);
150150
DEFINE_IOMAP_EVENT(iomap_iter_srcmap);
151+
DEFINE_IOMAP_EVENT(iomap_writepage_map);
151152

152153
TRACE_EVENT(iomap_iter,
153154
TP_PROTO(struct iomap_iter *iter, const void *ops,

0 commit comments

Comments
 (0)