Re: [PATCH v4 1/2] f2fs: flush SIT journal during filesystem resize
From: Chao Yu
Date: Mon Oct 19 2026 - 06:01:33 EST
On 10/16/26 13:44, Wenjie Qi wrote:
> During a filesystem resize, SBI_IS_RESIZEFS prevents new SIT entries
> from being added to the journal and forces existing entries to the SIT
> area. However, f2fs_flush_sit_entries() returns early when there are no
> new dirty sentries, leaving existing journal entries behind.
>
> After the main area shrinks, a later checkpoint can access a journal
> entry whose segment number is outside the new geometry and trigger
> f2fs_bug_on().
>
> Only take the zero-dirty fast path when entries may be written back to
> the journal. This lets resize drain existing entries through
> remove_sits_in_journal() even when there are no new dirty sentries.
>
Cc: stable@xxxxxxxxxx
> Fixes: 04f0b2eaa3b3 ("f2fs: ioctl for removing a range from F2FS")
> Reviewed-by: Daeho Jeong <daehojeong@xxxxxxxxxx>
> Signed-off-by: Wenjie Qi <qiwenjie@xxxxxxxxxx>
Reviewed-by: Chao Yu <chao@xxxxxxxxxx>
Thanks,