summaryrefslogtreecommitdiffstats
path: root/include/trace/events/btrfs.h
diff options
context:
space:
mode:
authorJeff Mahoney2016-06-22 03:16:51 +0200
committerDavid Sterba2016-12-06 16:06:57 +0100
commit6bccf3ab1e1f0913268bfcd1c09cadb1f4f2857d (patch)
treea7eae4bb4dec1cd2f7b21f5010549bfaa9aaa08c /include/trace/events/btrfs.h
parentbtrfs: call functions that overwrite their root parameter with fs_info (diff)
downloadkernel-qcow2-linux-6bccf3ab1e1f0913268bfcd1c09cadb1f4f2857d.tar.gz
kernel-qcow2-linux-6bccf3ab1e1f0913268bfcd1c09cadb1f4f2857d.tar.xz
kernel-qcow2-linux-6bccf3ab1e1f0913268bfcd1c09cadb1f4f2857d.zip
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/trace/events/btrfs.h')
-rw-r--r--include/trace/events/btrfs.h16
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,