Re: [f2fs-dev] [PATCH v2] f2fs: avoid setting SBI_NEED_FSCK on transient resize failure

From: Chao Yu

Date: Thu Aug 20 2026 - 19:52:17 EST


On 8/21/26 00:43, Daeho Jeong wrote:
From: Daeho Jeong <daehojeong@xxxxxxxxxx>

When free_segment_range() fails in f2fs_resize_fs(), no on-disk
superblock or filesystem metadata has been modified yet, and
free_segment_range() safely restores all in-memory counters before
returning.

However, the current error recovery path unconditionally sets the
SBI_NEED_FSCK flag and prints a scary error message on any error,
forcing an unnecessary and time-consuming fsck.f2fs repair on the
subsequent mount/reboot.

Fix this by separating the error recovery path with a dedicated
recover_user_blocks label to bypass setting SBI_NEED_FSCK on
free_segment_range() failures.

Signed-off-by: Daeho Jeong <daehojeong@xxxxxxxxxx>
Signed-off-by: Sunmin Jeong <s_min.jeong@xxxxxxxxxxx>

Reviewed-by: Chao Yu <chao@xxxxxxxxxx>

Thanks,