diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-05-21 06:42:37 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-06-03 04:05:13 +0300 |
commit | 26de9b11713057a16a9220423a2f137774763b0e (patch) | |
tree | cf238a2873c5b3befbe1499f9005de554a759a9e /fs/f2fs/inode.c | |
parent | ee6d182f2a19d5d44607b5ae4bec523726d76a99 (diff) | |
download | linux-26de9b11713057a16a9220423a2f137774763b0e.tar.xz |
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/inode.c')
-rw-r--r-- | fs/f2fs/inode.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 2d892b6d5632..bdd814db883e 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -154,6 +154,9 @@ static int do_read_inode(struct inode *inode) if (__written_first_block(ri)) set_inode_flag(inode, FI_FIRST_BLOCK_WRITTEN); + if (!need_inode_block_update(sbi, inode->i_ino)) + fi->last_disk_size = inode->i_size; + f2fs_put_page(node_page, 1); stat_inc_inline_xattr(inode); |