summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/file.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2017-02-08 17:39:45 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2017-02-23 10:10:52 -0800
commitd260081ccf37f57b74396ec48f415f27d1b01b13 (patch)
tree1e7cd5fcda412d400209c061340b938fd9d8e122 /fs/f2fs/file.c
parent2ad0ef846b38288103d8373d1196c465df2c4d7d (diff)
downloadlinux-stable-d260081ccf37f57b74396ec48f415f27d1b01b13.tar.gz
linux-stable-d260081ccf37f57b74396ec48f415f27d1b01b13.tar.bz2
linux-stable-d260081ccf37f57b74396ec48f415f27d1b01b13.zip
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>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r--fs/f2fs/file.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index a3808c49e326..120164815030 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -142,8 +142,6 @@ static inline bool need_do_checkpoint(struct inode *inode)
need_cp = true;
else if (!is_checkpointed_node(sbi, F2FS_I(inode)->i_pino))
need_cp = true;
- else if (F2FS_I(inode)->xattr_ver == cur_cp_version(F2FS_CKPT(sbi)))
- need_cp = true;
else if (test_opt(sbi, FASTBOOT))
need_cp = true;
else if (sbi->active_logs == 2)
@@ -169,7 +167,6 @@ static void try_to_fix_pino(struct inode *inode)
nid_t pino;
down_write(&fi->i_sem);
- fi->xattr_ver = 0;
if (file_wrong_pino(inode) && inode->i_nlink == 1 &&
get_parent_ino(inode, &pino)) {
f2fs_i_pino_write(inode, pino);