Re: [PATCH v9 05/11] f2fs: describe dentry block layout dynamically
From: Chao Yu
Date: Thu Sep 03 2026 - 22:00:52 EST
On 9/4/26 07:56, Kelvin Zhang wrote:
An on-disk directory block contains a bitmap, reserved padding, an
array of directory entries (struct f2fs_dir_entry), and matching filename
slots. A fixed compile-time structure couples their offsets to 4KB blocks
and relies on static reserved-space definitions.
Remove struct f2fs_dentry_block and compute region offsets (bitmap
bytes, directory-entry count, and filename slots) dynamically from the
filesystem block size. Access directory blocks through
struct f2fs_dentry_ptr views initialized with the runtime geometry.
Update directory operations, inline dentry handling, and recovery paths
to use the dynamic block layout. No functional change is introduced for
4KB blocks.
Signed-off-by: Kelvin Zhang <zhangxp1998@xxxxxxxxx>
Reviewed-by: Chao Yu <chao@xxxxxxxxxx>
Thanks,