summaryrefslogtreecommitdiff
path: root/fs/btrfs/reada.c
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2016-06-15 16:22:56 +0300
committerDavid Sterba <dsterba@suse.com>2016-12-06 18:06:58 +0300
commitda17066c40472c2d6a1aab7bb0090c3d285531c9 (patch)
treef51910799ffea3bfe5af34d009a2967b9e99e6ad /fs/btrfs/reada.c
parentf15376df0dc2b632eb689793a73d4adba8404987 (diff)
downloadlinux-da17066c40472c2d6a1aab7bb0090c3d285531c9.tar.xz
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>
Diffstat (limited to 'fs/btrfs/reada.c')
-rw-r--r--fs/btrfs/reada.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c
index 540e729975be..c51292abbd03 100644
--- a/fs/btrfs/reada.c
+++ b/fs/btrfs/reada.c
@@ -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",