f2fs: trace f2fs_remove_discard
authorChao Yu <yuchao0@huawei.com>
Wed, 4 Oct 2017 01:08:36 +0000 (09:08 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 19 Dec 2017 01:21:55 +0000 (17:21 -0800)
This patch adds tracepoint to trace f2fs_remove_discard.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c
include/trace/events/f2fs.h

index 1bb7417b4ebbeb27f5cafb4c22d9c8cc1c2030d9..d6614037e04eb492eb8dce7f677a0ea7403ee4f1 100644 (file)
@@ -822,6 +822,8 @@ static void __remove_discard_cmd(struct f2fs_sb_info *sbi,
 {
        struct discard_cmd_control *dcc = SM_I(sbi)->dcc_info;
 
+       trace_f2fs_remove_discard(dc->bdev, dc->start, dc->len);
+
        f2fs_bug_on(sbi, dc->ref);
 
        if (dc->error == -EOPNOTSUPP)
index 7ab40491485bc0b9604aa07fae9fa4a3575509e1..59768508cb7646e3c761e3361447164fb5a020ea 100644 (file)
@@ -1287,6 +1287,13 @@ DEFINE_EVENT(f2fs_discard, f2fs_issue_discard,
        TP_ARGS(dev, blkstart, blklen)
 );
 
+DEFINE_EVENT(f2fs_discard, f2fs_remove_discard,
+
+       TP_PROTO(struct block_device *dev, block_t blkstart, block_t blklen),
+
+       TP_ARGS(dev, blkstart, blklen)
+);
+
 TRACE_EVENT(f2fs_issue_reset_zone,
 
        TP_PROTO(struct block_device *dev, block_t blkstart),