diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-09-20 21:57:51 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-09-30 15:01:28 -0700 |
commit | 75ab4cb8301adb3a02a96c5c03c837ed941f1bc5 (patch) | |
tree | 30a8db554b044b90a8ba59ca0bac2afb5ddb59d3 /include/trace | |
parent | 95dd89730119b97d82f9edc806757cef737703e5 (diff) | |
download | op-kernel-dev-75ab4cb8301adb3a02a96c5c03c837ed941f1bc5.zip op-kernel-dev-75ab4cb8301adb3a02a96c5c03c837ed941f1bc5.tar.gz |
f2fs: introduce cp_control structure
This patch add a new data structure to control checkpoint parameters.
Currently, it presents the reason of checkpoint such as is_umount and normal
sync.
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/f2fs.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index d06d443..66eaace 100644 --- a/include/trace/events/f2fs.h +++ b/include/trace/events/f2fs.h @@ -69,6 +69,11 @@ { GC_GREEDY, "Greedy" }, \ { GC_CB, "Cost-Benefit" }) +#define show_cpreason(type) \ + __print_symbolic(type, \ + { CP_UMOUNT, "Umount" }, \ + { CP_SYNC, "Sync" }) + struct victim_sel_policy; DECLARE_EVENT_CLASS(f2fs__inode, @@ -944,25 +949,25 @@ TRACE_EVENT(f2fs_submit_page_mbio, TRACE_EVENT(f2fs_write_checkpoint, - TP_PROTO(struct super_block *sb, bool is_umount, char *msg), + TP_PROTO(struct super_block *sb, int reason, char *msg), - TP_ARGS(sb, is_umount, msg), + TP_ARGS(sb, reason, msg), TP_STRUCT__entry( __field(dev_t, dev) - __field(bool, is_umount) + __field(int, reason) __field(char *, msg) ), TP_fast_assign( __entry->dev = sb->s_dev; - __entry->is_umount = is_umount; + __entry->reason = reason; __entry->msg = msg; ), TP_printk("dev = (%d,%d), checkpoint for %s, state = %s", show_dev(__entry), - __entry->is_umount ? "clean umount" : "consistency", + show_cpreason(__entry->reason), __entry->msg) ); |