Skip to content

Commit

Permalink
f2fs: fix por_doing variable coverage
Browse files Browse the repository at this point in the history
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: Jaegeuk Kim <jaegeuk.kim@samsung.com>
  • Loading branch information
Jaegeuk Kim committed May 28, 2013
1 parent addbe45 commit 8c26d7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/f2fs/recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ int recover_fsync_data(struct f2fs_sb_info *sbi)
INIT_LIST_HEAD(&inode_list);

/* step #1: find fsynced inode numbers */
sbi->por_doing = 1;
err = find_fsync_dnodes(sbi, &inode_list);
if (err)
goto out;
Expand All @@ -389,13 +390,12 @@ int recover_fsync_data(struct f2fs_sb_info *sbi)
goto out;

/* step #2: recover data */
sbi->por_doing = 1;
err = recover_data(sbi, &inode_list, CURSEG_WARM_NODE);
sbi->por_doing = 0;
BUG_ON(!list_empty(&inode_list));
out:
destroy_fsync_dnodes(sbi, &inode_list);
kmem_cache_destroy(fsync_entry_slab);
sbi->por_doing = 0;
write_checkpoint(sbi, false);
return err;
}

0 comments on commit 8c26d7d

Please sign in to comment.