]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: change recovery policy of xattr node block
authorChao Yu <yuchao0@huawei.com>
Wed, 8 Feb 2017 09:39:45 +0000 (17:39 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 23 Feb 2017 18:10:52 +0000 (10:10 -0800)
commit3a7d8bbdf733a7e23671df798208434c779ed044
tree1e7cd5fcda412d400209c061340b938fd9d8e122
parente67129fcd51fa8d69e234ea5c346a4170557a738
f2fs: change recovery policy of xattr node block

Currently, if we call fsync after updating the xattr date belongs to the
file, f2fs needs to trigger checkpoint to keep xattr data consistent. But,
this policy cause low performance as checkpoint will block most foreground
operations and cause unneeded and unrelated IOs around checkpoint.

This patch will reuse regular file recovery policy for xattr node block,
so, we change to write xattr node block tagged with fsync flag to warm
area instead of cold area, and during recovery, we search warm node chain
for fsynced xattr block, and do the recovery.

So, for below application IO pattern, performance can be improved
obviously:
- touch file
- create/update/delete xattr entry in file
- fsync file

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/node.c
fs/f2fs/node.h
fs/f2fs/recovery.c
fs/f2fs/xattr.c