f2fs: add tracepoint for f2fs_issue_flush
This patch adds a tracepoint for f2fs_issue_flush. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
cf2271e781
commit
24a9ee0fa3
|
@ -239,6 +239,9 @@ int f2fs_issue_flush(struct f2fs_sb_info *sbi)
|
||||||
struct flush_cmd_control *fcc = SM_I(sbi)->cmd_control_info;
|
struct flush_cmd_control *fcc = SM_I(sbi)->cmd_control_info;
|
||||||
struct flush_cmd cmd;
|
struct flush_cmd cmd;
|
||||||
|
|
||||||
|
trace_f2fs_issue_flush(sbi->sb, test_opt(sbi, NOBARRIER),
|
||||||
|
test_opt(sbi, FLUSH_MERGE));
|
||||||
|
|
||||||
if (test_opt(sbi, NOBARRIER))
|
if (test_opt(sbi, NOBARRIER))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
@ -926,6 +926,30 @@ TRACE_EVENT(f2fs_issue_discard,
|
||||||
(unsigned long long)__entry->blkstart,
|
(unsigned long long)__entry->blkstart,
|
||||||
(unsigned long long)__entry->blklen)
|
(unsigned long long)__entry->blklen)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
TRACE_EVENT(f2fs_issue_flush,
|
||||||
|
|
||||||
|
TP_PROTO(struct super_block *sb, bool nobarrier, bool flush_merge),
|
||||||
|
|
||||||
|
TP_ARGS(sb, nobarrier, flush_merge),
|
||||||
|
|
||||||
|
TP_STRUCT__entry(
|
||||||
|
__field(dev_t, dev)
|
||||||
|
__field(bool, nobarrier)
|
||||||
|
__field(bool, flush_merge)
|
||||||
|
),
|
||||||
|
|
||||||
|
TP_fast_assign(
|
||||||
|
__entry->dev = sb->s_dev;
|
||||||
|
__entry->nobarrier = nobarrier;
|
||||||
|
__entry->flush_merge = flush_merge;
|
||||||
|
),
|
||||||
|
|
||||||
|
TP_printk("dev = (%d,%d), %s %s",
|
||||||
|
show_dev(__entry),
|
||||||
|
__entry->nobarrier ? "skip (nobarrier)" : "issue",
|
||||||
|
__entry->flush_merge ? " with flush_merge" : "")
|
||||||
|
);
|
||||||
#endif /* _TRACE_F2FS_H */
|
#endif /* _TRACE_F2FS_H */
|
||||||
|
|
||||||
/* This part must be outside protection */
|
/* This part must be outside protection */
|
||||||
|
|
Loading…
Reference in New Issue