diff options
author | Jeff Mahoney <jeffm@suse.com> | 2016-06-15 10:25:38 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-07-26 13:54:24 +0200 |
commit | 14a1e067b45614d6236e3c82b36f62caef44ac62 (patch) | |
tree | 2efadf6e036988c7b3f9d3d8e120b76db51b29e8 /fs/btrfs/extent-tree.c | |
parent | 0c83b62e2222a8872f0b65d50540fdfa53b675ff (diff) | |
download | blackbird-op-linux-14a1e067b45614d6236e3c82b36f62caef44ac62.tar.gz blackbird-op-linux-14a1e067b45614d6236e3c82b36f62caef44ac62.zip |
btrfs: introduce BTRFS_MAX_ITEM_SIZE
We use BTRFS_LEAF_DATA_SIZE - sizeof(struct btrfs_item) in
several places. This introduces a BTRFS_MAX_ITEM_SIZE macro to do the
same.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index c4487e177234..44549d706dcd 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -2779,7 +2779,7 @@ u64 btrfs_csum_bytes_to_leaves(struct btrfs_root *root, u64 csum_bytes) u64 num_csums_per_leaf; u64 num_csums; - csum_size = BTRFS_LEAF_DATA_SIZE(root) - sizeof(struct btrfs_item); + csum_size = BTRFS_MAX_ITEM_SIZE(root); num_csums_per_leaf = div64_u64(csum_size, (u64)btrfs_super_csum_size(root->fs_info->super_copy)); num_csums = div64_u64(csum_bytes, root->sectorsize); |