summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/recovery.c
diff options
context:
space:
mode:
authorJaegeuk Kim2016-05-21 05:42:37 +0200
committerJaegeuk Kim2016-06-03 03:05:13 +0200
commit26de9b11713057a16a9220423a2f137774763b0e (patch)
treecf238a2873c5b3befbe1499f9005de554a759a9e /fs/f2fs/recovery.c
parentf2fs: remove syncing inode page in all the cases (diff)
downloadkernel-qcow2-linux-26de9b11713057a16a9220423a2f137774763b0e.tar.gz
kernel-qcow2-linux-26de9b11713057a16a9220423a2f137774763b0e.tar.xz
kernel-qcow2-linux-26de9b11713057a16a9220423a2f137774763b0e.zip
f2fs: avoid unnecessary updating inode during fsync
If roll-forward recovery can recover i_size, we don't need to update inode's metadata during fsync. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/recovery.c')
-rw-r--r--fs/f2fs/recovery.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index 68c433f17ab5..b568b28c74f2 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -455,6 +455,9 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode,
continue;
}
+ if ((start + 1) << PAGE_SHIFT > i_size_read(inode))
+ f2fs_i_size_write(inode, (start + 1) << PAGE_SHIFT);
+
/*
* dest is reserved block, invalidate src block
* and then reserve one new block in dnode page.