aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2016-11-30 19:10:10 -0500
committerDavid Sterba <dsterba@suse.com>2017-01-09 05:27:07 -0500
commit7856654842bdbebc0fbcbf51573da5d70a787aba (patch)
tree4e51ee8a5434cf5cee3d2298ba48c9871b5d0ba5
parent92a1bf76a89ad338f00eb9a2c7689a3907fbcaad (diff)
Btrfs: add truncated_len for ordered extent tracepoints
This can help us monitor truncated ordered extents. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--include/trace/events/btrfs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h
index 3048f5205363..2026a89786b0 100644
--- a/include/trace/events/btrfs.h
+++ b/include/trace/events/btrfs.h
@@ -263,6 +263,7 @@ DECLARE_EVENT_CLASS(btrfs__ordered_extent,
263 __field( int, compress_type ) 263 __field( int, compress_type )
264 __field( int, refs ) 264 __field( int, refs )
265 __field( u64, root_objectid ) 265 __field( u64, root_objectid )
266 __field( u64, truncated_len )
266 ), 267 ),
267 268
268 TP_fast_assign_btrfs(btrfs_sb(inode->i_sb), 269 TP_fast_assign_btrfs(btrfs_sb(inode->i_sb),
@@ -277,10 +278,12 @@ DECLARE_EVENT_CLASS(btrfs__ordered_extent,
277 __entry->refs = atomic_read(&ordered->refs); 278 __entry->refs = atomic_read(&ordered->refs);
278 __entry->root_objectid = 279 __entry->root_objectid =
279 BTRFS_I(inode)->root->root_key.objectid; 280 BTRFS_I(inode)->root->root_key.objectid;
281 __entry->truncated_len = ordered->truncated_len;
280 ), 282 ),
281 283
282 TP_printk_btrfs("root = %llu(%s), ino = %llu, file_offset = %llu, " 284 TP_printk_btrfs("root = %llu(%s), ino = %llu, file_offset = %llu, "
283 "start = %llu, len = %llu, disk_len = %llu, " 285 "start = %llu, len = %llu, disk_len = %llu, "
286 "truncated_len = %llu, "
284 "bytes_left = %llu, flags = %s, compress_type = %d, " 287 "bytes_left = %llu, flags = %s, compress_type = %d, "
285 "refs = %d", 288 "refs = %d",
286 show_root_type(__entry->root_objectid), 289 show_root_type(__entry->root_objectid),
@@ -289,6 +292,7 @@ DECLARE_EVENT_CLASS(btrfs__ordered_extent,
289 (unsigned long long)__entry->start, 292 (unsigned long long)__entry->start,
290 (unsigned long long)__entry->len, 293 (unsigned long long)__entry->len,
291 (unsigned long long)__entry->disk_len, 294 (unsigned long long)__entry->disk_len,
295 (unsigned long long)__entry->truncated_len,
292 (unsigned long long)__entry->bytes_left, 296 (unsigned long long)__entry->bytes_left,
293 show_ordered_flags(__entry->flags), 297 show_ordered_flags(__entry->flags),
294 __entry->compress_type, __entry->refs) 298 __entry->compress_type, __entry->refs)