diff options
author | Jeff Mahoney <jeffm@suse.com> | 2016-06-15 10:25:38 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-07-26 07:54:24 -0400 |
commit | 14a1e067b45614d6236e3c82b36f62caef44ac62 (patch) | |
tree | 2efadf6e036988c7b3f9d3d8e120b76db51b29e8 /fs/btrfs/volumes.c | |
parent | 0c83b62e2222a8872f0b65d50540fdfa53b675ff (diff) |
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/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 5e409e28a5c0..104a2e42ed71 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -4573,8 +4573,7 @@ static void check_raid56_incompat_flag(struct btrfs_fs_info *info, u64 type) | |||
4573 | btrfs_set_fs_incompat(info, RAID56); | 4573 | btrfs_set_fs_incompat(info, RAID56); |
4574 | } | 4574 | } |
4575 | 4575 | ||
4576 | #define BTRFS_MAX_DEVS(r) ((BTRFS_LEAF_DATA_SIZE(r) \ | 4576 | #define BTRFS_MAX_DEVS(r) ((BTRFS_MAX_ITEM_SIZE(r) \ |
4577 | - sizeof(struct btrfs_item) \ | ||
4578 | - sizeof(struct btrfs_chunk)) \ | 4577 | - sizeof(struct btrfs_chunk)) \ |
4579 | / sizeof(struct btrfs_stripe) + 1) | 4578 | / sizeof(struct btrfs_stripe) + 1) |
4580 | 4579 | ||