[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230425165857.29175-1-frank.li@vivo.com>
Date: Wed, 26 Apr 2023 00:58:57 +0800
From: Yangtao Li <frank.li@...o.com>
To: jaegeuk@...nel.org, chao@...nel.org
Cc: linux-f2fs-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, Yangtao Li <frank.li@...o.com>
Subject: [PATCH] f2fs: no need test opt for f2fs_issue_flush
This information can now be obtained from the mount, and there isi
no need to print it out every time the trace event is triggered.
Signed-off-by: Yangtao Li <frank.li@...o.com>
---
fs/f2fs/segment.c | 3 +--
include/trace/events/f2fs.h | 13 +++----------
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 6db410f1bb8c..2683c4dd3bd5 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -519,8 +519,7 @@ static int __submit_flush_wait(struct f2fs_sb_info *sbi,
{
int ret = blkdev_issue_flush(bdev);
- trace_f2fs_issue_flush(bdev, test_opt(sbi, NOBARRIER),
- test_opt(sbi, FLUSH_MERGE), ret);
+ trace_f2fs_issue_flush(bdev, ret);
if (!ret)
f2fs_update_iostat(sbi, NULL, FS_FLUSH_IO, 0);
return ret;
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index 99cbc5949e3c..2a94c1d2e012 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -1535,29 +1535,22 @@ TRACE_EVENT(f2fs_issue_reset_zone,
TRACE_EVENT(f2fs_issue_flush,
- TP_PROTO(struct block_device *dev, unsigned int nobarrier,
- unsigned int flush_merge, int ret),
+ TP_PROTO(struct block_device *dev, int ret),
- TP_ARGS(dev, nobarrier, flush_merge, ret),
+ TP_ARGS(dev, ret),
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(unsigned int, nobarrier)
- __field(unsigned int, flush_merge)
__field(int, ret)
),
TP_fast_assign(
__entry->dev = dev->bd_dev;
- __entry->nobarrier = nobarrier;
- __entry->flush_merge = flush_merge;
__entry->ret = ret;
),
- TP_printk("dev = (%d,%d), %s %s, ret = %d",
+ TP_printk("dev = (%d,%d), ret = %d",
show_dev(__entry->dev),
- __entry->nobarrier ? "skip (nobarrier)" : "issue",
- __entry->flush_merge ? " with flush_merge" : "",
__entry->ret)
);
--
2.39.0
Powered by blists - more mailing lists