summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2019-04-11 11:48:09 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2019-05-08 21:59:47 -0700
commit9bc578bf83ee6fd250046d1ced1cf130f573b618 (patch)
tree3feebfb99f9976ab667cd35256be5e763a6f5051 /kernel
parent0d7333632d794355cd5478ab6c672c0dcadb9be7 (diff)
f2fs: fix to retrieve inline xattr space
With below mkfs and mount option, generic/339 of fstest will report that scratch image becomes corrupted. MKFS_OPTIONS -- -O extra_attr -O project_quota -O inode_checksum -O flexible_inline_xattr -O inode_crtime -f /dev/zram1 MOUNT_OPTIONS -- -o acl,user_xattr -o discard,noinline_xattr /dev/zram1 /mnt/scratch_f2fs [ASSERT] (f2fs_check_dirent_position:1315) --> Wrong position of dirent pino:1970, name: (...) level:8, dir_level:0, pgofs:951, correct range:[900, 901] In old kernel, inline data and directory always reserved 200 bytes in inode layout, even if inline_xattr is disabled, then new kernel tries to retrieve that space for non-inline xattr inode, but for inline dentry, its layout size should be fixed, so we just keep that reserved space. But the problem here is that, after inline dentry conversion, inline dentry layout no longer exists, if we still reserve inline xattr space, after dents updates, there will be a hole in inline xattr space, which can break hierarchy hash directory structure. This patch fixes this issue by retrieving inline xattr space after inline dentry conversion. Fixes: 6afc662e68b5 ("f2fs: support flexible inline xattr size") Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions