f2fs: introduce cp_control structure
This patch add a new data structure to control checkpoint parameters. Currently, it presents the reason of checkpoint such as is_umount and normal sync. Reviewed-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
@@ -542,8 +542,11 @@ out:
|
||||
set_ckpt_flags(sbi->ckpt, CP_ERROR_FLAG);
|
||||
mutex_unlock(&sbi->cp_mutex);
|
||||
} else if (need_writecp) {
|
||||
struct cp_control cpc = {
|
||||
.reason = CP_SYNC,
|
||||
};
|
||||
mutex_unlock(&sbi->cp_mutex);
|
||||
write_checkpoint(sbi, false);
|
||||
write_checkpoint(sbi, &cpc);
|
||||
} else {
|
||||
mutex_unlock(&sbi->cp_mutex);
|
||||
}
|
||||
|
Reference in New Issue
Block a user