alistair23-linux/fs/f2fs
Chao Yu 622927f3b8 f2fs: fix to use inline space only if inline_xattr is enable
With below mkfs and mount option:

MKFS_OPTIONS  -- -O extra_attr -O project_quota -O inode_checksum -O flexible_inline_xattr -O inode_crtime -f
MOUNT_OPTIONS -- -o noinline_xattr

We may miss xattr data with below testcase:
- mkdir dir
- setfattr -n "user.name" -v 0 dir
- for ((i = 0; i < 190; i++)) do touch dir/$i; done
- umount
- mount
- getfattr -n "user.name" dir

user.name: No such attribute

The root cause is that we persist xattr data into reserved inline xattr
space, even if inline_xattr is not enable in inline directory inode, after
inline dentry conversion, reserved space no longer exists, so that xattr
data missed.

Let's use inline xattr space only if inline_xattr flag is set on inode
to fix this iusse.

Fixes: 6afc662e68 ("f2fs: support flexible inline xattr size")
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2019-05-08 21:23:07 -07:00
..
acl.c f2fs: use kvmalloc, if kmalloc is failed 2018-12-26 15:16:53 -08:00
acl.h f2fs: add SPDX license identifiers 2018-09-12 13:07:10 -07:00
checkpoint.c f2fs: fix potential recursive call when enabling data_flush 2019-04-05 09:34:14 -07:00
data.c f2fs: data: fix warning Using plain integer as NULL pointer 2019-04-16 13:51:33 -07:00
debug.c f2fs: no need to check return value of debugfs_create functions 2019-01-22 14:25:25 +01:00
dir.c f2fs-for-5.1-rc1 2019-03-15 13:42:53 -07:00
extent_cache.c f2fs: fix to initialize variable to avoid UBSAN/smatch warning 2019-01-22 15:31:26 -08:00
f2fs.h f2fs: fix to use inline space only if inline_xattr is enable 2019-05-08 21:23:07 -07:00
file.c f2fs: add tracepoint for f2fs_file_write_iter() 2019-04-16 13:51:32 -07:00
gc.c f2fs: fix to avoid deadloop in foreground GC 2019-05-08 21:23:06 -07:00
gc.h f2fs: add SPDX license identifiers 2018-09-12 13:07:10 -07:00
hash.c f2fs: add SPDX license identifiers 2018-09-12 13:07:10 -07:00
inline.c f2fs: fix to retrieve inline xattr space 2019-05-08 21:23:06 -07:00
inode.c f2fs-for-5.1-rc1 2019-03-15 13:42:53 -07:00
Kconfig fscrypt: remove filesystem specific build config option 2019-01-23 23:56:43 -05:00
Makefile
namei.c f2fs-for-5.1-rc1 2019-03-15 13:42:53 -07:00
node.c f2fs: fix to add refcount once page is tagged PG_private 2019-03-12 18:59:19 -07:00
node.h f2fs: check PageWriteback flag for ordered case 2018-12-26 15:16:56 -08:00
recovery.c f2fs: fix error path of recovery 2019-05-08 21:23:06 -07:00
segment.c f2fs: improve discard handling with multi-device volumes 2019-04-05 09:33:55 -07:00
segment.h f2fs: don't wake up too frequently, if there is lots of IOs 2019-02-15 20:59:45 -08:00
shrinker.c f2fs: fix sbi->extent_list corruption issue 2018-12-26 15:16:54 -08:00
super.c f2fs: Reduce zoned block device memory usage 2019-04-05 09:33:55 -07:00
sysfs.c f2fs-for-5.1-rc1 2019-03-15 13:42:53 -07:00
trace.c f2fs: do not use mutex lock in atomic context 2019-03-05 19:58:06 -08:00
trace.h f2fs: add SPDX license identifiers 2018-09-12 13:07:10 -07:00
xattr.c f2fs: fix to adapt small inline xattr space in __find_inline_xattr() 2019-03-12 19:02:26 -07:00
xattr.h f2fs: fix to do sanity check with inode.i_inline_xattr_size 2019-03-12 19:02:26 -07:00