If we use mount option "-o max_inline=sectorsize", say 4096, indeed
even for a fresh fs, say nodesize is 16k, we can not make the first
4k data completely inline, I found this conditon causing this issue:
!compressed_size && (actual_end & (root->sectorsize - 1)) == 0
If it retuns true, we'll not make data inline. For 4k sectorsize,
0~4094 dara range, we can make it inline, but 0~4095, it can not.
I don't think this limition is useful, so here remove it which will
make max inline data can be equal to sectorsize.
Signed-off-by: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
if (start > 0 ||
actual_end > PAGE_CACHE_SIZE ||
data_len > BTRFS_MAX_INLINE_DATA_SIZE(root) ||
- (!compressed_size &&
- (actual_end & (root->sectorsize - 1)) == 0) ||
end + 1 < isize ||
data_len > root->fs_info->max_inline) {
return 1;