[PATCH v2 0/2] f2fs: fix online resize state

From: Wenjie Qi

Date: Sat Aug 29 2026 - 02:05:42 EST


Online filesystem shrink changes both persistent SIT state and the
in-memory geometry used by pinned allocation. Two stale-state paths can
leave old information active after the main area is reduced.

Patch 1 makes the resize checkpoint drain existing SIT journal entries
through the normal SIT-area write path even when there are no newly
dirty sentries. Patch 2 refreshes the pinned allocation boundary after
every geometry change and rejects a shrink that conflicts with the
configured resizable tail.

Changes since v1:
- Simplify the incompatible-tail condition.
- Log the main, shrink, and tail section counts on rejection.
- Validate before acquiring the mount write reference.
- Restore compact formatting in the shared boundary helper.
- Recheck after freeze to cover a concurrent remount option change.

Wenjie Qi (2):
f2fs: flush SIT journal during filesystem resize
f2fs: refresh pinned allocation boundary after resize

fs/f2fs/gc.c | 27 ++++++++++++++++++++++++---
fs/f2fs/segment.c | 2 +-
fs/f2fs/segment.h | 13 +++++++++++++
fs/f2fs/super.c | 15 ++-------------
4 files changed, 40 insertions(+), 17 deletions(-)

--
2.43.0