aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2014-09-21 00:57:51 -0400
committerJaegeuk Kim <jaegeuk@kernel.org>2014-09-30 18:01:28 -0400
commit75ab4cb8301adb3a02a96c5c03c837ed941f1bc5 (patch)
tree30a8db554b044b90a8ba59ca0bac2afb5ddb59d3 /include
parent95dd89730119b97d82f9edc806757cef737703e5 (diff)
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')
-rw-r--r--include/trace/events/f2fs.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index d06d44363fea..66eaace9c07e 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -69,6 +69,11 @@
69 { GC_GREEDY, "Greedy" }, \ 69 { GC_GREEDY, "Greedy" }, \
70 { GC_CB, "Cost-Benefit" }) 70 { GC_CB, "Cost-Benefit" })
71 71
72#define show_cpreason(type) \
73 __print_symbolic(type, \
74 { CP_UMOUNT, "Umount" }, \
75 { CP_SYNC, "Sync" })
76
72struct victim_sel_policy; 77struct victim_sel_policy;
73 78
74DECLARE_EVENT_CLASS(f2fs__inode, 79DECLARE_EVENT_CLASS(f2fs__inode,
@@ -944,25 +949,25 @@ TRACE_EVENT(f2fs_submit_page_mbio,
944 949
945TRACE_EVENT(f2fs_write_checkpoint, 950TRACE_EVENT(f2fs_write_checkpoint,
946 951
947 TP_PROTO(struct super_block *sb, bool is_umount, char *msg), 952 TP_PROTO(struct super_block *sb, int reason, char *msg),
948 953
949 TP_ARGS(sb, is_umount, msg), 954 TP_ARGS(sb, reason, msg),
950 955
951 TP_STRUCT__entry( 956 TP_STRUCT__entry(
952 __field(dev_t, dev) 957 __field(dev_t, dev)
953 __field(bool, is_umount) 958 __field(int, reason)
954 __field(char *, msg) 959 __field(char *, msg)
955 ), 960 ),
956 961
957 TP_fast_assign( 962 TP_fast_assign(
958 __entry->dev = sb->s_dev; 963 __entry->dev = sb->s_dev;
959 __entry->is_umount = is_umount; 964 __entry->reason = reason;
960 __entry->msg = msg; 965 __entry->msg = msg;
961 ), 966 ),
962 967
963 TP_printk("dev = (%d,%d), checkpoint for %s, state = %s", 968 TP_printk("dev = (%d,%d), checkpoint for %s, state = %s",
964 show_dev(__entry), 969 show_dev(__entry),
965 __entry->is_umount ? "clean umount" : "consistency", 970 show_cpreason(__entry->reason),
966 __entry->msg) 971 __entry->msg)
967); 972);
968 973