Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1735019
| From | Chao Yu <chao@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 5/6] f2fs: trace f2fs_remove_discard |
| Date | 2017-09-19 17:40 +0200 |
| Message-ID | <ursMW-7dF-27@gated-at.bofh.it> (permalink) |
| References | <ursMV-7dF-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Chao Yu <yuchao0@huawei.com>
This patch adds tracepoint to trace f2fs_remove_discard.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
fs/f2fs/segment.c | 2 ++
include/trace/events/f2fs.h | 7 +++++++
2 files changed, 9 insertions(+)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 412ac3a68be3..85f909419b69 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -794,6 +794,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)
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index 8955e75dd48e..407713ef5981 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -1286,6 +1286,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),
--
2.14.1.145.gb3622a4ee
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/6] f2fs: support issuing/waiting discard in range Chao Yu <chao@kernel.org> - 2017-09-19 17:40 +0200 [PATCH 6/6] f2fs: give up CP_TRIMMED_FLAG if it drops discards Chao Yu <chao@kernel.org> - 2017-09-19 17:40 +0200 [PATCH 5/6] f2fs: trace f2fs_remove_discard Chao Yu <chao@kernel.org> - 2017-09-19 17:40 +0200 [PATCH 3/6] f2fs: split discard policy Chao Yu <chao@kernel.org> - 2017-09-19 17:40 +0200
csiph-web