Skip to content

Commit

Permalink
f2fs: trace f2fs_remove_discard
Browse files Browse the repository at this point in the history
This patch adds tracepoint to trace f2fs_remove_discard.

Signed-off-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
  • Loading branch information
chaseyu authored and Jaegeuk Kim committed Oct 26, 2017
1 parent 33da62c commit 2ec6f2e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/f2fs/segment.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions include/trace/events/f2fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 2ec6f2e

Please sign in to comment.