aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2012-01-10 10:31:31 -0500
committerChris Mason <chris.mason@oracle.com>2012-01-16 15:29:43 -0500
commit8c2a3ca20f6233677ac3222c6506174010eb414f (patch)
tree88d1105c665d355b363929557ed0c5489795e348 /include
parent90290e19820e3323ce6b9c2888eeb68bf29c278b (diff)
Btrfs: space leak tracepoints
This in addition to a script in my btrfs-tracing tree will help track down space leaks when we're getting space left over in block groups on umount. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/trace/events/btrfs.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h
index 1750c0e6660c..84f3001a568d 100644
--- a/include/trace/events/btrfs.h
+++ b/include/trace/events/btrfs.h
@@ -55,6 +55,8 @@ struct extent_buffer;
55 { BTRFS_BLOCK_GROUP_DUP, "DUP"}, \ 55 { BTRFS_BLOCK_GROUP_DUP, "DUP"}, \
56 { BTRFS_BLOCK_GROUP_RAID10, "RAID10"} 56 { BTRFS_BLOCK_GROUP_RAID10, "RAID10"}
57 57
58#define BTRFS_UUID_SIZE 16
59
58TRACE_EVENT(btrfs_transaction_commit, 60TRACE_EVENT(btrfs_transaction_commit,
59 61
60 TP_PROTO(struct btrfs_root *root), 62 TP_PROTO(struct btrfs_root *root),
@@ -632,6 +634,34 @@ TRACE_EVENT(btrfs_cow_block,
632 __entry->cow_level) 634 __entry->cow_level)
633); 635);
634 636
637TRACE_EVENT(btrfs_space_reservation,
638
639 TP_PROTO(struct btrfs_fs_info *fs_info, char *type, u64 val,
640 u64 bytes, int reserve),
641
642 TP_ARGS(fs_info, type, val, bytes, reserve),
643
644 TP_STRUCT__entry(
645 __array( u8, fsid, BTRFS_UUID_SIZE )
646 __string( type, type )
647 __field( u64, val )
648 __field( u64, bytes )
649 __field( int, reserve )
650 ),
651
652 TP_fast_assign(
653 memcpy(__entry->fsid, fs_info->fsid, BTRFS_UUID_SIZE);
654 __assign_str(type, type);
655 __entry->val = val;
656 __entry->bytes = bytes;
657 __entry->reserve = reserve;
658 ),
659
660 TP_printk("%pU: %s: %Lu %s %Lu", __entry->fsid, __get_str(type),
661 __entry->val, __entry->reserve ? "reserve" : "release",
662 __entry->bytes)
663);
664
635DECLARE_EVENT_CLASS(btrfs__reserved_extent, 665DECLARE_EVENT_CLASS(btrfs__reserved_extent,
636 666
637 TP_PROTO(struct btrfs_root *root, u64 start, u64 len), 667 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),