btrfs: pull node/sector/stripe sizes out of root and into fs_info
We track the node sizes per-root, but they never vary from the values in the superblock. This patch messes with the 80-column style a bit, but subsequent patches to factor out root->fs_info into a convenience variable fix it up again. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:

committed by
David Sterba

parent
f15376df0d
commit
da17066c40
@@ -335,7 +335,7 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root,
|
||||
if (!re)
|
||||
return NULL;
|
||||
|
||||
blocksize = root->nodesize;
|
||||
blocksize = root->fs_info->nodesize;
|
||||
re->logical = logical;
|
||||
re->top = *top;
|
||||
INIT_LIST_HEAD(&re->extctl);
|
||||
@@ -679,7 +679,7 @@ static int reada_start_machine_dev(struct btrfs_fs_info *fs_info,
|
||||
spin_unlock(&fs_info->reada_lock);
|
||||
return 0;
|
||||
}
|
||||
dev->reada_next = re->logical + fs_info->tree_root->nodesize;
|
||||
dev->reada_next = re->logical + fs_info->nodesize;
|
||||
re->refcnt++;
|
||||
|
||||
spin_unlock(&fs_info->reada_lock);
|
||||
@@ -843,7 +843,7 @@ static void dump_devs(struct btrfs_fs_info *fs_info, int all)
|
||||
if (ret == 0)
|
||||
break;
|
||||
pr_debug(" re: logical %llu size %u empty %d scheduled %d",
|
||||
re->logical, fs_info->tree_root->nodesize,
|
||||
re->logical, fs_info->nodesize,
|
||||
list_empty(&re->extctl), re->scheduled);
|
||||
|
||||
for (i = 0; i < re->nzones; ++i) {
|
||||
@@ -876,7 +876,7 @@ static void dump_devs(struct btrfs_fs_info *fs_info, int all)
|
||||
continue;
|
||||
}
|
||||
pr_debug("re: logical %llu size %u list empty %d scheduled %d",
|
||||
re->logical, fs_info->tree_root->nodesize,
|
||||
re->logical, fs_info->nodesize,
|
||||
list_empty(&re->extctl), re->scheduled);
|
||||
for (i = 0; i < re->nzones; ++i) {
|
||||
pr_cont(" zone %llu-%llu devs",
|
||||
|
Reference in New Issue
Block a user