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:
parent
f15376df0d
commit
da17066c40
39 changed files with 432 additions and 414 deletions
|
|
@ -91,7 +91,7 @@ static inline int compressed_bio_size(struct btrfs_root *root,
|
|||
u16 csum_size = btrfs_super_csum_size(root->fs_info->super_copy);
|
||||
|
||||
return sizeof(struct compressed_bio) +
|
||||
(DIV_ROUND_UP(disk_size, root->sectorsize)) * csum_size;
|
||||
(DIV_ROUND_UP(disk_size, root->fs_info->sectorsize)) * csum_size;
|
||||
}
|
||||
|
||||
static struct bio *compressed_bio_alloc(struct block_device *bdev,
|
||||
|
|
@ -696,7 +696,7 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
|
|||
BUG_ON(ret); /* -ENOMEM */
|
||||
}
|
||||
sums += DIV_ROUND_UP(comp_bio->bi_iter.bi_size,
|
||||
root->sectorsize);
|
||||
root->fs_info->sectorsize);
|
||||
|
||||
ret = btrfs_map_bio(root, comp_bio, mirror_num, 0);
|
||||
if (ret) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue