summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/inode.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2016-05-20 11:10:10 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2016-06-02 18:05:11 -0700
commit0f18b462b2e5aff64b8638e8a47284b907351ef3 (patch)
treeb39406fe286595610a0e5f785fb9913551df898d /fs/f2fs/inode.c
parent205b98221cdf72b1cbdedf55f93d193999616e6e (diff)
downloadtalos-op-linux-0f18b462b2e5aff64b8638e8a47284b907351ef3.tar.gz
talos-op-linux-0f18b462b2e5aff64b8638e8a47284b907351ef3.zip
f2fs: flush inode metadata when checkpoint is doing
This patch registers all the inodes which have dirty metadata to sync when checkpoint is doing. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/inode.c')
-rw-r--r--fs/f2fs/inode.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index 34aa0949e48c..2d892b6d5632 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -262,7 +262,7 @@ int update_inode(struct inode *inode, struct page *node_page)
__set_inode_rdev(inode, ri);
set_cold_node(inode, node_page);
- clear_inode_flag(inode, FI_DIRTY_INODE);
+ f2fs_inode_synced(inode);
/* deleted inode */
if (inode->i_nlink == 0)
@@ -286,6 +286,7 @@ retry:
} else if (err != -ENOENT) {
f2fs_stop_checkpoint(sbi, false);
}
+ f2fs_inode_synced(inode);
return 0;
}
ret = update_inode(inode, node_page);
@@ -360,6 +361,8 @@ retry:
goto retry;
}
+ if (err)
+ update_inode_page(inode);
sb_end_intwrite(inode->i_sb);
no_delete:
stat_dec_inline_xattr(inode);
@@ -381,6 +384,8 @@ no_delete:
!exist_written_data(sbi, inode->i_ino, ORPHAN_INO));
out_clear:
fscrypt_put_encryption_info(inode, NULL);
+
+ f2fs_bug_on(sbi, is_inode_flag_set(inode, FI_DIRTY_INODE));
clear_inode(inode);
}
OpenPOWER on IntegriCloud