aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>2014-07-16 23:44:12 -0400
committerChris Mason <clm@fb.com>2014-09-17 16:37:40 -0400
commitc01a5c074c0f6f85a3b02e39432b9e5576ab51de (patch)
treedf4639085926886cd841f1f2aa10a54d08906f0f /fs
parent354877befa852e9b62ddc92a6cc017210e982d46 (diff)
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')
-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 {
394#define BTRFS_LEAF_DATA_SIZE(r) (__BTRFS_LEAF_DATA_SIZE(r->nodesize)) 394#define BTRFS_LEAF_DATA_SIZE(r) (__BTRFS_LEAF_DATA_SIZE(r->nodesize))
395#define BTRFS_MAX_INLINE_DATA_SIZE(r) (BTRFS_LEAF_DATA_SIZE(r) - \ 395#define BTRFS_MAX_INLINE_DATA_SIZE(r) (BTRFS_LEAF_DATA_SIZE(r) - \
396 sizeof(struct btrfs_item) - \ 396 sizeof(struct btrfs_item) - \
397 sizeof(struct btrfs_file_extent_item)) 397 offsetof(struct btrfs_file_extent_item, disk_bytenr))
398#define BTRFS_MAX_XATTR_SIZE(r) (BTRFS_LEAF_DATA_SIZE(r) - \ 398#define BTRFS_MAX_XATTR_SIZE(r) (BTRFS_LEAF_DATA_SIZE(r) - \
399 sizeof(struct btrfs_item) -\ 399 sizeof(struct btrfs_item) -\
400 sizeof(struct btrfs_dir_item)) 400 sizeof(struct btrfs_dir_item))