diff options
author | Jeff Mahoney <jeffm@suse.com> | 2016-06-15 09:22:56 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-12-06 16:06:58 +0100 |
commit | da17066c40472c2d6a1aab7bb0090c3d285531c9 (patch) | |
tree | f51910799ffea3bfe5af34d009a2967b9e99e6ad /fs/btrfs/send.c | |
parent | f15376df0dc2b632eb689793a73d4adba8404987 (diff) | |
download | linux-stable-da17066c40472c2d6a1aab7bb0090c3d285531c9.tar.gz linux-stable-da17066c40472c2d6a1aab7bb0090c3d285531c9.tar.bz2 linux-stable-da17066c40472c2d6a1aab7bb0090c3d285531c9.zip |
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/send.c')
-rw-r--r-- | fs/btrfs/send.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 71261b459863..78845cc81dd6 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -1054,7 +1054,8 @@ static int iterate_dir_item(struct btrfs_root *root, struct btrfs_path *path, ret = -ENAMETOOLONG; goto out; } - if (name_len + data_len > BTRFS_MAX_XATTR_SIZE(root)) { + if (name_len + data_len > + BTRFS_MAX_XATTR_SIZE(root->fs_info)) { ret = -E2BIG; goto out; } @@ -5264,7 +5265,7 @@ static int get_last_extent(struct send_ctx *sctx, u64 offset) u64 size = btrfs_file_extent_inline_len(path->nodes[0], path->slots[0], fi); extent_end = ALIGN(key.offset + size, - sctx->send_root->sectorsize); + sctx->send_root->fs_info->sectorsize); } else { extent_end = key.offset + btrfs_file_extent_num_bytes(path->nodes[0], fi); @@ -5299,7 +5300,7 @@ static int maybe_send_hole(struct send_ctx *sctx, struct btrfs_path *path, u64 size = btrfs_file_extent_inline_len(path->nodes[0], path->slots[0], fi); extent_end = ALIGN(key->offset + size, - sctx->send_root->sectorsize); + sctx->send_root->fs_info->sectorsize); } else { extent_end = key->offset + btrfs_file_extent_num_bytes(path->nodes[0], fi); |