summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>2014-07-17 11:44:12 +0800
committerChris Mason <clm@fb.com>2014-09-17 13:37:40 -0700
commitc01a5c074c0f6f85a3b02e39432b9e5576ab51de (patch)
treedf4639085926886cd841f1f2aa10a54d08906f0f /fs/btrfs/ctree.h
parent354877befa852e9b62ddc92a6cc017210e982d46 (diff)
downloadtalos-op-linux-c01a5c074c0f6f85a3b02e39432b9e5576ab51de.tar.gz
talos-op-linux-c01a5c074c0f6f85a3b02e39432b9e5576ab51de.zip
Btrfs: fix wrong max inline data size limit
inline data is stored from offset of @disk_bytenr in struct btrfs_file_extent_item. So substracting total size of struct btrfs_file_extent_item is wrong, fix it. Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com> Reviewed-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 6fc16d22d27d..840ecb78e727 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -394,7 +394,7 @@ struct btrfs_header {
#define BTRFS_LEAF_DATA_SIZE(r) (__BTRFS_LEAF_DATA_SIZE(r->nodesize))
#define BTRFS_MAX_INLINE_DATA_SIZE(r) (BTRFS_LEAF_DATA_SIZE(r) - \
sizeof(struct btrfs_item) - \
- sizeof(struct btrfs_file_extent_item))
+ offsetof(struct btrfs_file_extent_item, disk_bytenr))
#define BTRFS_MAX_XATTR_SIZE(r) (BTRFS_LEAF_DATA_SIZE(r) - \
sizeof(struct btrfs_item) -\
sizeof(struct btrfs_dir_item))
OpenPOWER on IntegriCloud