f2fs: report error of do_checkpoint
do_checkpoint and write_checkpoint can fail due to reasons like triggering in a readonly fs or encountering IO error of storage device. So it's better to report such error info to user, let user be aware of failure of doing checkpoint. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Šī revīzija ir iekļauta:

revīziju iesūtīja
Jaegeuk Kim

vecāks
2a34076070
revīzija
c34f42e2cb
@@ -579,6 +579,7 @@ static void f2fs_put_super(struct super_block *sb)
|
||||
int f2fs_sync_fs(struct super_block *sb, int sync)
|
||||
{
|
||||
struct f2fs_sb_info *sbi = F2FS_SB(sb);
|
||||
int err = 0;
|
||||
|
||||
trace_f2fs_sync_fs(sb, sync);
|
||||
|
||||
@@ -588,14 +589,14 @@ int f2fs_sync_fs(struct super_block *sb, int sync)
|
||||
cpc.reason = __get_cp_reason(sbi);
|
||||
|
||||
mutex_lock(&sbi->gc_mutex);
|
||||
write_checkpoint(sbi, &cpc);
|
||||
err = write_checkpoint(sbi, &cpc);
|
||||
mutex_unlock(&sbi->gc_mutex);
|
||||
} else {
|
||||
f2fs_balance_fs(sbi);
|
||||
}
|
||||
f2fs_trace_ios(NULL, 1);
|
||||
|
||||
return 0;
|
||||
return err;
|
||||
}
|
||||
|
||||
static int f2fs_freeze(struct super_block *sb)
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user