Similarly to the regular discard, trace zone reset events.

Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
---
 fs/f2fs/segment.c           |  1 +
 include/trace/events/f2fs.h | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index bce79e2..064a78b 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -688,6 +688,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);
 
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index 903a091..a2193e3 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -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,
-- 
2.7.4

Western Digital Corporation (and its subsidiaries) E-mail Confidentiality 
Notice & Disclaimer:

This e-mail and any files transmitted with it may contain confidential or 
legally privileged information of WDC and/or its affiliates, and are intended 
solely for the use of the individual or entity to which they are addressed. If 
you are not the intended recipient, any disclosure, copying, distribution or 
any action taken or omitted to be taken in reliance on it, is prohibited. If 
you have received this e-mail in error, please notify the sender immediately 
and delete the e-mail in its entirety from your system.


------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to