mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2026-01-04 18:16:33 +00:00
f2fs: check free sections before disable checkpoint
'f2fs_is_checkpoint_ready()' checks free sections. If there is not enough free sections, most f2fs operations will return -ENOSPC when checkpoint is disabled. It would be better to check free sections before disable checkpoint. Signed-off-by: Wu Bo <bo.wu@vivo.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
c10e8558d4
commit
0d8c7542f9
@ -906,6 +906,8 @@ int f2fs_disable_cp_again(struct f2fs_sb_info *sbi, block_t unusable)
|
||||
if (is_sbi_flag_set(sbi, SBI_CP_DISABLED_QUICK) &&
|
||||
dirty_segments(sbi) > ovp_hole_segs)
|
||||
return -EAGAIN;
|
||||
if (has_not_enough_free_secs(sbi, 0, 0))
|
||||
return -EAGAIN;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user