aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-10-11 08:03:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-11 08:03:52 -0400
commit90d0c376f5ee1927327b267faf15bf970476f09e (patch)
treeb4ed1266ac45a34133e0e93b739067d5f5b33703 /include/trace/events
parentac0c49396d5ed9a33f08ce661635ac1bff80bb4f (diff)
parenta43bb39b5c710e79e921fb76341bacc418cfde78 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs updates from Chris Mason: "The largest set of changes here come from Miao Xie. He's cleaning up and improving read recovery/repair for raid, and has a number of related fixes. I've merged another set of fsync fixes from Filipe, and he's also improved the way we handle metadata write errors to make sure we force the FS readonly if things go wrong. Otherwise we have a collection of fixes and cleanups. Dave Sterba gets a cookie for removing the most lines (thanks Dave)" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (139 commits) btrfs: Fix compile error when CONFIG_SECURITY is not set. Btrfs: fix compiles when CONFIG_BTRFS_FS_RUN_SANITY_TESTS is off btrfs: Make btrfs handle security mount options internally to avoid losing security label. Btrfs: send, don't delay dir move if there's a new parent inode btrfs: add more superblock checks Btrfs: fix race in WAIT_SYNC ioctl Btrfs: be aware of btree inode write errors to avoid fs corruption Btrfs: remove redundant btrfs_verify_qgroup_counts declaration. btrfs: fix shadow warning on cmp Btrfs: fix compilation errors under DEBUG Btrfs: fix crash of btrfs_release_extent_buffer_page Btrfs: add missing end_page_writeback on submit_extent_page failure btrfs: Fix the wrong condition judgment about subset extent map Btrfs: fix build_backref_tree issue with multiple shared blocks Btrfs: cleanup error handling in build_backref_tree btrfs: move checks for DUMMY_ROOT into a helper btrfs: new define for the inline extent data start btrfs: kill extent_buffer_page helper btrfs: drop constant param from btrfs_release_extent_buffer_page btrfs: hide typecast to definition of BTRFS_SEND_TRANS_STUB ...
Diffstat (limited to 'include/trace/events')
-rw-r--r--include/trace/events/btrfs.h85
1 files changed, 69 insertions, 16 deletions
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h
index 4ee4e30d26d9..1faecea101f3 100644
--- a/include/trace/events/btrfs.h
+++ b/include/trace/events/btrfs.h
@@ -23,6 +23,7 @@ struct map_lookup;
23struct extent_buffer; 23struct extent_buffer;
24struct btrfs_work; 24struct btrfs_work;
25struct __btrfs_workqueue; 25struct __btrfs_workqueue;
26struct btrfs_qgroup_operation;
26 27
27#define show_ref_type(type) \ 28#define show_ref_type(type) \
28 __print_symbolic(type, \ 29 __print_symbolic(type, \
@@ -157,12 +158,13 @@ DEFINE_EVENT(btrfs__inode, btrfs_inode_evict,
157 158
158#define show_map_flags(flag) \ 159#define show_map_flags(flag) \
159 __print_flags(flag, "|", \ 160 __print_flags(flag, "|", \
160 { EXTENT_FLAG_PINNED, "PINNED" }, \ 161 { (1 << EXTENT_FLAG_PINNED), "PINNED" },\
161 { EXTENT_FLAG_COMPRESSED, "COMPRESSED" }, \ 162 { (1 << EXTENT_FLAG_COMPRESSED), "COMPRESSED" },\
162 { EXTENT_FLAG_VACANCY, "VACANCY" }, \ 163 { (1 << EXTENT_FLAG_VACANCY), "VACANCY" },\
163 { EXTENT_FLAG_PREALLOC, "PREALLOC" }, \ 164 { (1 << EXTENT_FLAG_PREALLOC), "PREALLOC" },\
164 { EXTENT_FLAG_LOGGING, "LOGGING" }, \ 165 { (1 << EXTENT_FLAG_LOGGING), "LOGGING" },\
165 { EXTENT_FLAG_FILLING, "FILLING" }) 166 { (1 << EXTENT_FLAG_FILLING), "FILLING" },\
167 { (1 << EXTENT_FLAG_FS_MAPPING), "FS_MAPPING" })
166 168
167TRACE_EVENT_CONDITION(btrfs_get_extent, 169TRACE_EVENT_CONDITION(btrfs_get_extent,
168 170
@@ -996,6 +998,7 @@ DECLARE_EVENT_CLASS(btrfs__work,
996 __field( void *, func ) 998 __field( void *, func )
997 __field( void *, ordered_func ) 999 __field( void *, ordered_func )
998 __field( void *, ordered_free ) 1000 __field( void *, ordered_free )
1001 __field( void *, normal_work )
999 ), 1002 ),
1000 1003
1001 TP_fast_assign( 1004 TP_fast_assign(
@@ -1004,11 +1007,13 @@ DECLARE_EVENT_CLASS(btrfs__work,
1004 __entry->func = work->func; 1007 __entry->func = work->func;
1005 __entry->ordered_func = work->ordered_func; 1008 __entry->ordered_func = work->ordered_func;
1006 __entry->ordered_free = work->ordered_free; 1009 __entry->ordered_free = work->ordered_free;
1010 __entry->normal_work = &work->normal_work;
1007 ), 1011 ),
1008 1012
1009 TP_printk("work=%p, wq=%p, func=%p, ordered_func=%p, ordered_free=%p", 1013 TP_printk("work=%p (normal_work=%p), wq=%p, func=%pf, ordered_func=%p,"
1010 __entry->work, __entry->wq, __entry->func, 1014 " ordered_free=%p",
1011 __entry->ordered_func, __entry->ordered_free) 1015 __entry->work, __entry->normal_work, __entry->wq,
1016 __entry->func, __entry->ordered_func, __entry->ordered_free)
1012); 1017);
1013 1018
1014/* For situiations that the work is freed */ 1019/* For situiations that the work is freed */
@@ -1043,13 +1048,6 @@ DEFINE_EVENT(btrfs__work, btrfs_work_sched,
1043 TP_ARGS(work) 1048 TP_ARGS(work)
1044); 1049);
1045 1050
1046DEFINE_EVENT(btrfs__work, btrfs_normal_work_done,
1047
1048 TP_PROTO(struct btrfs_work *work),
1049
1050 TP_ARGS(work)
1051);
1052
1053DEFINE_EVENT(btrfs__work__done, btrfs_all_work_done, 1051DEFINE_EVENT(btrfs__work__done, btrfs_all_work_done,
1054 1052
1055 TP_PROTO(struct btrfs_work *work), 1053 TP_PROTO(struct btrfs_work *work),
@@ -1119,6 +1117,61 @@ DEFINE_EVENT(btrfs__workqueue_done, btrfs_workqueue_destroy,
1119 TP_ARGS(wq) 1117 TP_ARGS(wq)
1120); 1118);
1121 1119
1120#define show_oper_type(type) \
1121 __print_symbolic(type, \
1122 { BTRFS_QGROUP_OPER_ADD_EXCL, "OPER_ADD_EXCL" }, \
1123 { BTRFS_QGROUP_OPER_ADD_SHARED, "OPER_ADD_SHARED" }, \
1124 { BTRFS_QGROUP_OPER_SUB_EXCL, "OPER_SUB_EXCL" }, \
1125 { BTRFS_QGROUP_OPER_SUB_SHARED, "OPER_SUB_SHARED" })
1126
1127DECLARE_EVENT_CLASS(btrfs_qgroup_oper,
1128
1129 TP_PROTO(struct btrfs_qgroup_operation *oper),
1130
1131 TP_ARGS(oper),
1132
1133 TP_STRUCT__entry(
1134 __field( u64, ref_root )
1135 __field( u64, bytenr )
1136 __field( u64, num_bytes )
1137 __field( u64, seq )
1138 __field( int, type )
1139 __field( u64, elem_seq )
1140 ),
1141
1142 TP_fast_assign(
1143 __entry->ref_root = oper->ref_root;
1144 __entry->bytenr = oper->bytenr,
1145 __entry->num_bytes = oper->num_bytes;
1146 __entry->seq = oper->seq;
1147 __entry->type = oper->type;
1148 __entry->elem_seq = oper->elem.seq;
1149 ),
1150
1151 TP_printk("ref_root = %llu, bytenr = %llu, num_bytes = %llu, "
1152 "seq = %llu, elem.seq = %llu, type = %s",
1153 (unsigned long long)__entry->ref_root,
1154 (unsigned long long)__entry->bytenr,
1155 (unsigned long long)__entry->num_bytes,
1156 (unsigned long long)__entry->seq,
1157 (unsigned long long)__entry->elem_seq,
1158 show_oper_type(__entry->type))
1159);
1160
1161DEFINE_EVENT(btrfs_qgroup_oper, btrfs_qgroup_account,
1162
1163 TP_PROTO(struct btrfs_qgroup_operation *oper),
1164
1165 TP_ARGS(oper)
1166);
1167
1168DEFINE_EVENT(btrfs_qgroup_oper, btrfs_qgroup_record_ref,
1169
1170 TP_PROTO(struct btrfs_qgroup_operation *oper),
1171
1172 TP_ARGS(oper)
1173);
1174
1122#endif /* _TRACE_BTRFS_H */ 1175#endif /* _TRACE_BTRFS_H */
1123 1176
1124/* This part must be outside protection */ 1177/* This part must be outside protection */