RE:(3) [PATCH v2 2/2] f2fs: pack same-inode blocks by inode during FG_GC
From: Daejun Park
Date: Tue Jun 30 2026 - 06:31:31 EST
On 6/30/26 13:25, Daejun Park wrote:
> v3 will run the recompute only on the normal completion path (move it
> above stop:), so a frozen GC no longer inflates the trace; on the normal
> path the count already equals what legacy reports.
Correction: v3 will NOT move the recompute above stop:.
A gc_pack_max_blocks mid-section drain can free segments before a freeze. With
the recompute above stop:, those would be missed on the 'goto stop' path,
under-reporting seg_freed and risking a spurious -EAGAIN there. So v3 keeps the
recompute after the pack pass on all exit paths, as v2 does. It still counts
already-empty segments (needed for the seg_freed == f2fs_usable_segs_in_sec()
equality); on the freezing path that only affects the total_freed tracepoint,
not the -EAGAIN decision.
Thanks,
Daejun