f2fs: should recover orphan and fsync data
The recovery routine should do all the time regardless of normal umount action. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
This commit is contained in:
@@ -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 */
|
/* if there are nt orphan nodes free them */
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
if (!is_set_ckpt_flags(F2FS_CKPT(sbi), CP_UMOUNT_FLAG) &&
|
if (recover_orphan_inodes(sbi))
|
||||||
recover_orphan_inodes(sbi))
|
|
||||||
goto free_node_inode;
|
goto free_node_inode;
|
||||||
|
|
||||||
/* read root inode and dentry */
|
/* read root inode and dentry */
|
||||||
@@ -548,8 +547,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* recover fsynced data */
|
/* recover fsynced data */
|
||||||
if (!is_set_ckpt_flags(F2FS_CKPT(sbi), CP_UMOUNT_FLAG) &&
|
if (!test_opt(sbi, DISABLE_ROLL_FORWARD))
|
||||||
!test_opt(sbi, DISABLE_ROLL_FORWARD))
|
|
||||||
recover_fsync_data(sbi);
|
recover_fsync_data(sbi);
|
||||||
|
|
||||||
/* After POR, we can run background GC thread */
|
/* After POR, we can run background GC thread */
|
||||||
|
Reference in New Issue
Block a user