iomap: trace iomap_appply results
Subsystems (2)
PATCH 1/1 iomap: trace iomap_appply results
This is basically a debugging patch that I've been using to monitor what exactly xfs is sending back to iomap, and thought I ought to pitch it to the mailing list universe to see what reaction I get.
--D
---
From: Darrick J. Wong <[email protected]>
Add some tracepoints so that we can more easily debug what the filesystem is returning from ->iomap_begin.
Signed-off-by Darrick J. Wong <[email protected]>
--- fs/iomap/apply.c | 7 ++++ fs/iomap/trace.h | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+)
fs/iomap/apply.c +7 -0
@@ -7,6 +7,7 @@#include <linux/compiler.h> #include <linux/fs.h> #include <linux/iomap.h> +#include "trace.h" /* * Execute a iomap write on a segment of the mapping that spans a
@@ -28,6 +29,8 @@ iomap_apply(struct inode *inode, loff_t pos, loff_t length, unsigned flags,loff_t written =0 , ret;u64 end; +trace_iomap_apply (inode, pos, length, flags, ops, actor, _RET_IP_); +/* * Need to map a range from start position for length bytes. This can * span multiple pages - it is only guaranteed to return a range of a
@@ -48,6 +51,10 @@ iomap_apply(struct inode *inode, loff_t pos, loff_t length, unsigned flags,if (WARN_ON (iomap.length ==0 ))return -EIO ; +trace_iomap_apply_dstmap (inode, &iomap); +if (srcmap.type !=IOMAP_HOLE ) +trace_iomap_apply_srcmap (inode, &srcmap); +/* * Cut down the length to the one actually provided by the filesystem, * as it might not be able to give us the whole size that we requested.
fs/iomap/trace.h +103 -0
109 lines not on this page · raw message
Looks good,
Reviewed-by Christoph Hellwig <[email protected]>