Skip to content

Commit

Permalink
iomap: add a tracepoint for mappings returned by map_blocks
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Darrick J. Wong committed Oct 2, 2022
1 parent 3d5f3ba commit adc9c2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions fs/iomap/buffered-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1360,6 +1360,7 @@ iomap_writepage_map(struct iomap_writepage_ctx *wpc,
error = wpc->ops->map_blocks(wpc, inode, pos);
if (error)
break;
trace_iomap_writepage_map(inode, &wpc->iomap);
if (WARN_ON_ONCE(wpc->iomap.type == IOMAP_INLINE))
continue;
if (wpc->iomap.type == IOMAP_HOLE)
Expand Down
1 change: 1 addition & 0 deletions fs/iomap/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ DEFINE_EVENT(iomap_class, name, \
TP_ARGS(inode, iomap))
DEFINE_IOMAP_EVENT(iomap_iter_dstmap);
DEFINE_IOMAP_EVENT(iomap_iter_srcmap);
DEFINE_IOMAP_EVENT(iomap_writepage_map);

TRACE_EVENT(iomap_iter,
TP_PROTO(struct iomap_iter *iter, const void *ops,
Expand Down

0 comments on commit adc9c2e

Please sign in to comment.