Commit 8c26d7d5 authored by Jaegeuk Kim's avatar Jaegeuk Kim

f2fs: fix por_doing variable coverage

The reason of using sbi->por_doing is to alleviate data writes during the
recovery.
The find_fsync_dnodes() produces some dirty dentry pages, so we should
cover it too with sbi->por_doing.
Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
parent addbe45b
...@@ -381,6 +381,7 @@ int recover_fsync_data(struct f2fs_sb_info *sbi) ...@@ -381,6 +381,7 @@ int recover_fsync_data(struct f2fs_sb_info *sbi)
INIT_LIST_HEAD(&inode_list); INIT_LIST_HEAD(&inode_list);
/* step #1: find fsynced inode numbers */ /* step #1: find fsynced inode numbers */
sbi->por_doing = 1;
err = find_fsync_dnodes(sbi, &inode_list); err = find_fsync_dnodes(sbi, &inode_list);
if (err) if (err)
goto out; goto out;
...@@ -389,13 +390,12 @@ int recover_fsync_data(struct f2fs_sb_info *sbi) ...@@ -389,13 +390,12 @@ int recover_fsync_data(struct f2fs_sb_info *sbi)
goto out; goto out;
/* step #2: recover data */ /* step #2: recover data */
sbi->por_doing = 1;
err = recover_data(sbi, &inode_list, CURSEG_WARM_NODE); err = recover_data(sbi, &inode_list, CURSEG_WARM_NODE);
sbi->por_doing = 0;
BUG_ON(!list_empty(&inode_list)); BUG_ON(!list_empty(&inode_list));
out: out:
destroy_fsync_dnodes(sbi, &inode_list); destroy_fsync_dnodes(sbi, &inode_list);
kmem_cache_destroy(fsync_entry_slab); kmem_cache_destroy(fsync_entry_slab);
sbi->por_doing = 0;
write_checkpoint(sbi, false); write_checkpoint(sbi, false);
return err; return err;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment