mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 05:34:13 +08:00
f2fs: put directory inodes before checkpoint in roll-forward recovery
Before checkpoint, we'd be better drop any inodes. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
a468f0ef51
commit
9e1e6df412
@ -630,6 +630,9 @@ out:
|
|||||||
set_ckpt_flags(sbi->ckpt, CP_ERROR_FLAG);
|
set_ckpt_flags(sbi->ckpt, CP_ERROR_FLAG);
|
||||||
mutex_unlock(&sbi->cp_mutex);
|
mutex_unlock(&sbi->cp_mutex);
|
||||||
|
|
||||||
|
/* let's drop all the directory inodes for clean checkpoint */
|
||||||
|
destroy_fsync_dnodes(&dir_list);
|
||||||
|
|
||||||
if (!err && need_writecp) {
|
if (!err && need_writecp) {
|
||||||
struct cp_control cpc = {
|
struct cp_control cpc = {
|
||||||
.reason = CP_RECOVERY,
|
.reason = CP_RECOVERY,
|
||||||
@ -637,7 +640,6 @@ out:
|
|||||||
err = write_checkpoint(sbi, &cpc);
|
err = write_checkpoint(sbi, &cpc);
|
||||||
}
|
}
|
||||||
|
|
||||||
destroy_fsync_dnodes(&dir_list);
|
|
||||||
kmem_cache_destroy(fsync_entry_slab);
|
kmem_cache_destroy(fsync_entry_slab);
|
||||||
return ret ? ret: err;
|
return ret ? ret: err;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user