Skip to content

Commit

Permalink
f2fs: should recover orphan and fsync data
Browse files Browse the repository at this point in the history
The recovery routine should do all the time regardless of normal umount action.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
  • Loading branch information
Jaegeuk Kim committed Dec 26, 2012
1 parent 398b1ac commit 30f0c75
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/f2fs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)

/* if there are nt orphan nodes free them */
err = -EINVAL;
if (!is_set_ckpt_flags(F2FS_CKPT(sbi), CP_UMOUNT_FLAG) &&
recover_orphan_inodes(sbi))
if (recover_orphan_inodes(sbi))
goto free_node_inode;

/* read root inode and dentry */
Expand All @@ -548,8 +547,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
}

/* recover fsynced data */
if (!is_set_ckpt_flags(F2FS_CKPT(sbi), CP_UMOUNT_FLAG) &&
!test_opt(sbi, DISABLE_ROLL_FORWARD))
if (!test_opt(sbi, DISABLE_ROLL_FORWARD))
recover_fsync_data(sbi);

/* After POR, we can run background GC thread */
Expand Down

0 comments on commit 30f0c75

Please sign in to comment.