Re: [PATCH] f2fs: skip further SIT updates for already invalidated blocks
From: Seongjae Jeong
Date: Sun Oct 11 2026 - 06:40:02 EST
Hi Chao,
> Cc stable.
>
> > Fixes: 81ffbd224e5f ("f2fs: update_sit_entry_for_release() supports consecutive blocks.")
>
> This commit didn't change previous logic? IIUC.
The discard bitmap handling already existed before this commit. It was
introduced
by a66cdd985532 ("f2fs: introduce discard_map for f2fs_trim_fs").
However, 81ffbd224e5f did change the checkpoint accounting.
Previously, del was set to 0 when the cur_valid_map bit was already cleared,
so se->ckpt_valid_blocks += del left the counter unchanged.
That commit replaced this logic with se->ckpt_valid_blocks -= 1,
regardless of the del value.
Thus, the counter is incorrectly decremented.
Would it make sense to add a second Fixes tag for a66cdd985532 to cover
the discard bitmap handling?