btrfs: Introduce fs_info to extent_io_tree
This patch will add a new member fs_info to extent_io_tree. This provides the basis for later trace events to distinguish the output between different btrfs filesystems. While this increases the size of the structure, we want to know the source of the trace events and passing the fs_info as an argument to all contexts is not possible. The selftests are now allowed to set it to NULL as they don't use the tracepoints. Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
@@ -4222,7 +4222,7 @@ out:
|
||||
return inode;
|
||||
}
|
||||
|
||||
static struct reloc_control *alloc_reloc_control(void)
|
||||
static struct reloc_control *alloc_reloc_control(struct btrfs_fs_info *fs_info)
|
||||
{
|
||||
struct reloc_control *rc;
|
||||
|
||||
@@ -4234,7 +4234,7 @@ static struct reloc_control *alloc_reloc_control(void)
|
||||
INIT_LIST_HEAD(&rc->dirty_subvol_roots);
|
||||
backref_cache_init(&rc->backref_cache);
|
||||
mapping_tree_init(&rc->reloc_root_tree);
|
||||
extent_io_tree_init(&rc->processed_blocks, NULL);
|
||||
extent_io_tree_init(fs_info, &rc->processed_blocks, NULL);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -4276,7 +4276,7 @@ int btrfs_relocate_block_group(struct btrfs_fs_info *fs_info, u64 group_start)
|
||||
return -ETXTBSY;
|
||||
}
|
||||
|
||||
rc = alloc_reloc_control();
|
||||
rc = alloc_reloc_control(fs_info);
|
||||
if (!rc) {
|
||||
btrfs_put_block_group(bg);
|
||||
return -ENOMEM;
|
||||
@@ -4472,7 +4472,7 @@ int btrfs_recover_relocation(struct btrfs_root *root)
|
||||
if (list_empty(&reloc_roots))
|
||||
goto out;
|
||||
|
||||
rc = alloc_reloc_control();
|
||||
rc = alloc_reloc_control(fs_info);
|
||||
if (!rc) {
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
|
Reference in New Issue
Block a user