On Thu, Jul 17, 2014 at 11:44:12AM +0800, Wang Shilong wrote: > 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.f...@cn.fujitsu.com>
Reviewed-by: David Sterba <dste...@suse.cz> > #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)) This increases the limit of inline data by 24 bytes but fortunatelly does not break existing filesystems because the BTRFS_MAX_INLINE_DATA_SIZE is used at the time the inlining is decided. IOW it is a bit pessimistic, the rest of the code uses the offsetof value. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html