diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-11-21 16:14:49 -0800 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-11-22 08:36:00 -0800 |
commit | 6334b91e502ca1ec10157f2a3a2c74eea6b5e279 (patch) | |
tree | a0cbe1cb3a714e74c3076d20917f732e7b689c57 /fs/iomap/apply.c | |
parent | e9f930ac88a8936ccc2d021110c98810cf5aa810 (diff) |
iomap: trace iomap_appply results
Add some tracepoints so that we can more easily debug what the
filesystem is returning from ->iomap_begin.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/iomap/apply.c')
-rw-r--r-- | fs/iomap/apply.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/iomap/apply.c b/fs/iomap/apply.c index 484dd8eda861..76925b40b5fd 100644 --- a/fs/iomap/apply.c +++ b/fs/iomap/apply.c @@ -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. |