diff options
author | Johannes Thumshirn <johannes.thumshirn@wdc.com> | 2021-01-26 23:21:15 +0300 |
---|---|---|
committer | Damien Le Moal <damien.lemoal@wdc.com> | 2021-02-16 03:59:54 +0300 |
commit | 62ab1aadcccd037a7ced4ed99b4d46d2b4190183 (patch) | |
tree | f6423157260b368f67d29eb566263bd2f5565691 /fs/zonefs/super.c | |
parent | 6ee1d745b7c9fd573fba142a2efdad76a9f1cb04 (diff) | |
download | linux-62ab1aadcccd037a7ced4ed99b4d46d2b4190183.tar.xz |
zonefs: add tracepoints for file operations
Add tracepoints for file I/O operations to aid in debugging of I/O errors
with zonefs.
The added tracepoints are in:
- zonefs_zone_mgmt() for tracing zone management operations
- zonefs_iomap_begin() for tracing regular file I/O
- zonefs_file_dio_append() for tracing zone-append operations
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Diffstat (limited to 'fs/zonefs/super.c')
-rw-r--r-- | fs/zonefs/super.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c index bec47f2d074b..96f0cb0c29aa 100644 --- a/fs/zonefs/super.c +++ b/fs/zonefs/super.c @@ -24,6 +24,9 @@ #include "zonefs.h" +#define CREATE_TRACE_POINTS +#include "trace.h" + static inline int zonefs_zone_mgmt(struct inode *inode, enum req_opf op) { @@ -32,6 +35,7 @@ static inline int zonefs_zone_mgmt(struct inode *inode, lockdep_assert_held(&zi->i_truncate_mutex); + trace_zonefs_zone_mgmt(inode, op); ret = blkdev_zone_mgmt(inode->i_sb->s_bdev, op, zi->i_zsector, zi->i_zone_size >> SECTOR_SHIFT, GFP_NOFS); if (ret) { @@ -100,6 +104,8 @@ static int zonefs_iomap_begin(struct inode *inode, loff_t offset, loff_t length, iomap->bdev = inode->i_sb->s_bdev; iomap->addr = (zi->i_zsector << SECTOR_SHIFT) + iomap->offset; + trace_zonefs_iomap_begin(inode, iomap); + return 0; } @@ -703,6 +709,7 @@ static ssize_t zonefs_file_dio_append(struct kiocb *iocb, struct iov_iter *from) ret = submit_bio_wait(bio); zonefs_file_write_dio_end_io(iocb, size, ret, 0); + trace_zonefs_file_dio_append(inode, size, ret); out_release: bio_release_pages(bio, false); |