diff options
author | Jeff Mahoney | 2016-06-21 21:16:51 -0400 |
---|---|---|
committer | David Sterba | 2016-12-06 16:06:57 +0100 |
commit | 6bccf3ab1e1f0913268bfcd1c09cadb1f4f2857d (patch) | |
tree | a7eae4bb4dec1cd2f7b21f5010549bfaa9aaa08c /include | |
parent | 5b4aacefb8fbfc996e68b9b083d30f8bc0972449 (diff) |
btrfs: call functions that always use the same root with fs_info instead
There are many functions that are always called with the same root
argument. Rather than passing the same root every time, we can
pass an fs_info pointer instead and have the function get the root
pointer itself.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/trace/events/btrfs.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h index e61bbc3b82d5..ff5cd17fed84 100644 --- a/include/trace/events/btrfs.h +++ b/include/trace/events/btrfs.h @@ -698,10 +698,10 @@ DEFINE_EVENT(btrfs_delayed_ref_head, run_delayed_ref_head, DECLARE_EVENT_CLASS(btrfs__chunk, - TP_PROTO(struct btrfs_root *root, struct map_lookup *map, + TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map, u64 offset, u64 size), - TP_ARGS(root, map, offset, size), + TP_ARGS(fs_info, map, offset, size), TP_STRUCT__entry_btrfs( __field( int, num_stripes ) @@ -712,13 +712,13 @@ DECLARE_EVENT_CLASS(btrfs__chunk, __field( u64, root_objectid ) ), - TP_fast_assign_btrfs(root->fs_info, + TP_fast_assign_btrfs(fs_info, __entry->num_stripes = map->num_stripes; __entry->type = map->type; __entry->sub_stripes = map->sub_stripes; __entry->offset = offset; __entry->size = size; - __entry->root_objectid = root->root_key.objectid; + __entry->root_objectid = fs_info->chunk_root->root_key.objectid; ), TP_printk_btrfs("root = %llu(%s), offset = %llu, size = %llu, " @@ -732,18 +732,18 @@ DECLARE_EVENT_CLASS(btrfs__chunk, DEFINE_EVENT(btrfs__chunk, btrfs_chunk_alloc, - TP_PROTO(struct btrfs_root *root, struct map_lookup *map, + TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map, u64 offset, u64 size), - TP_ARGS(root, map, offset, size) + TP_ARGS(fs_info, map, offset, size) ); DEFINE_EVENT(btrfs__chunk, btrfs_chunk_free, - TP_PROTO(struct btrfs_root *root, struct map_lookup *map, + TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map, u64 offset, u64 size), - TP_ARGS(root, map, offset, size) + TP_ARGS(fs_info, map, offset, size) ); TRACE_EVENT(btrfs_cow_block, |