f2fs: Trace reset zone events
authorDamien Le Moal <damien.lemoal@wdc.com>
Fri, 28 Oct 2016 08:45:07 +0000 (17:45 +0900)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 23 Nov 2016 20:11:24 +0000 (12:11 -0800)
Similarly to the regular discard, trace zone reset events.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c
include/trace/events/f2fs.h

index b7b40bad080ab1af85306d74846dcd422ff8a93a..5e7e311758f8dd4d03c7ea12a9fdf1373c49c6a4 100644 (file)
@@ -692,6 +692,7 @@ static int f2fs_issue_discard_zone(struct f2fs_sb_info *sbi,
 
        case BLK_ZONE_TYPE_SEQWRITE_REQ:
        case BLK_ZONE_TYPE_SEQWRITE_PREF:
+               trace_f2fs_issue_reset_zone(sbi->sb, blkstart);
                return blkdev_reset_zones(bdev, sector,
                                          nr_sects, GFP_NOFS);
        default:
index 903a09165bb1072277f2582af3c4264e0b76184a..a2193e35bc58640d5e8f6253c19e630c03b3f983 100644 (file)
@@ -1113,6 +1113,27 @@ TRACE_EVENT(f2fs_issue_discard,
                (unsigned long long)__entry->blklen)
 );
 
+TRACE_EVENT(f2fs_issue_reset_zone,
+
+       TP_PROTO(struct super_block *sb, block_t blkstart),
+
+       TP_ARGS(sb, blkstart),
+
+       TP_STRUCT__entry(
+               __field(dev_t,  dev)
+               __field(block_t, blkstart)
+       ),
+
+       TP_fast_assign(
+               __entry->dev    = sb->s_dev;
+               __entry->blkstart = blkstart;
+       ),
+
+       TP_printk("dev = (%d,%d), reset zone at block = 0x%llx",
+               show_dev(__entry),
+               (unsigned long long)__entry->blkstart)
+);
+
 TRACE_EVENT(f2fs_issue_flush,
 
        TP_PROTO(struct super_block *sb, unsigned int nobarrier,