Re: [PATCH 3/5] btrfs: Embed sector size check into BTRFS_MAX_INLINE_DATA_SIZE()

2018-03-06 Thread David Sterba
On Fri, Mar 02, 2018 at 01:22:52PM +0800, Qu Wenruo wrote: > We have extra sector size check in cow_file_range_inline(), but doesn't > implement it in BTRFS_MAX_INLINE_DATA_SIZE(). > > The biggest reason is that btrfs_symlink() also uses this macro to check > name length. I'm reading what the

[PATCH 3/5] btrfs: Embed sector size check into BTRFS_MAX_INLINE_DATA_SIZE()

2018-03-01 Thread Qu Wenruo
We have extra sector size check in cow_file_range_inline(), but doesn't implement it in BTRFS_MAX_INLINE_DATA_SIZE(). The biggest reason is that btrfs_symlink() also uses this macro to check name length. In fact such behavior makes max_inline calculation quite confusing, and cause unexpected