[PATCH 0/5] f2fs: prepare metadata layouts for runtime block sizes

From: Xinping Zhang

Date: Wed Aug 26 2026 - 17:42:24 EST


This series fixes a free-NID shrinker underflow and prepares selected
on-disk metadata structures for filesystem blocks whose size can differ
from PAGE_SIZE.

Patch 1 compares the free-NID count with its retention threshold before
subtraction, avoiding unsigned underflow.

Patches 2-5 make the SIT, orphan, dentry, and inode-node layouts describe
their runtime block-size geometry while preserving the current on-disk
format and behavior.

These are preparatory layout-only changes; the runtime geometry conversion
will follow separately.

Kelvin Zhang (5):
f2fs: avoid underflow when counting free NIDs
f2fs: describe SIT block layout dynamically
f2fs: describe orphan block layout dynamically
f2fs: describe dentry block layout dynamically
f2fs: describe inode node layout dynamically

fs/f2fs/checkpoint.c | 46 +++++++++++-----------
fs/f2fs/data.c | 2 +-
fs/f2fs/dir.c | 51 +++++++++++++------------
fs/f2fs/f2fs.h | 76 +++++++++++++++++++++++++++----------
fs/f2fs/gc.c | 2 +-
fs/f2fs/inline.c | 5 +--
fs/f2fs/inode.c | 5 +--
fs/f2fs/node.c | 4 +-
fs/f2fs/node.h | 53 ++++++++++++--------------
fs/f2fs/segment.c | 15 ++++----
fs/f2fs/segment.h | 19 +++++-----
fs/f2fs/shrinker.c | 5 ++-
fs/f2fs/super.c | 14 ++++++-
include/linux/f2fs_fs.h | 84 +++++++++++++++++++++++++----------------
14 files changed, 225 insertions(+), 156 deletions(-)

--
2.53.0