summaryrefslogtreecommitdiff
path: root/Kconfig
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2019-02-14 19:08:25 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2019-03-06 06:58:06 +0300
commit500e0b28ecd3c5aade98f3c3a339d18dcb166bb6 (patch)
treea0f16b854d4271ef5a9d6eaa816293fa316a3921 /Kconfig
parent9083977dabf3833298ddcd40dee28687f1e6b483 (diff)
downloadlinux-500e0b28ecd3c5aade98f3c3a339d18dcb166bb6.tar.xz
f2fs: fix to check inline_xattr_size boundary correctly
We use below condition to check inline_xattr_size boundary: if (!F2FS_OPTION(sbi).inline_xattr_size || F2FS_OPTION(sbi).inline_xattr_size >= DEF_ADDRS_PER_INODE - F2FS_TOTAL_EXTRA_ATTR_SIZE - DEF_INLINE_RESERVED_SIZE - DEF_MIN_INLINE_SIZE) There is there problems in that check: - we should allow inline_xattr_size equaling to min size of inline {data,dentry} area. - F2FS_TOTAL_EXTRA_ATTR_SIZE and inline_xattr_size are based on different size unit, previous one is 4 bytes, latter one is 1 bytes. - DEF_MIN_INLINE_SIZE only indicate min size of inline data area, however, we need to consider min size of inline dentry area as well, minimal inline dentry should at least contain two entries: '.' and '..', so that min inline_dentry size is 40 bytes. .bitmap 1 * 1 = 1 .reserved 1 * 1 = 1 .dentry 11 * 2 = 22 .filename 8 * 2 = 16 total 40 Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'Kconfig')
0 files changed, 0 insertions, 0 deletions