Re: [f2fs-dev] [PATCH v2 02/20] f2fs: support subpage block size superblock and mount
From: Chao Yu
Date: Tue Nov 17 2026 - 03:54:01 EST
On 11/16/26 12:08, Daeho Jeong wrote:
> From: Daeho Jeong <daehojeong@xxxxxxxxxx>
>
> Add the infrastructure to mount F2FS with a block size smaller than
> PAGE_SIZE, e.g. 4KB blocks on a 16KB page kernel.
>
> - Add helpers to convert between block indices, folio indices and
> offsets within a folio.
> - Take the block size from the 1st superblock, which is at the same
> offset for every block size. If it is invalid, probe the 2nd
> superblock with each supported block size from the smallest, and
> stop at the first one found, even if it is invalid, so that a stale
> superblock of a larger block size is not picked.
> - Allow log_blocksize up to PAGE_SHIFT, and write back only the target
> superblock block instead of the whole folio.
> - Bound log_sectorsize by log_blocksize, so that
> log_sectors_per_block + log_sectorsize cannot wrap around, and remove
> F2FS_MAX_LOG_SECTOR_SIZE, which has no user left.
> - Check the requested inline_xattr_size, not the current one,
> against the block size in f2fs_check_opt_consistency().
> - Keep rejecting subpage block sizes, and return -EOPNOTSUPP for the
> features that do not support them yet. Later patches add the support
> and lift these restrictions.
>
> Signed-off-by: Daeho Jeong <daehojeong@xxxxxxxxxx>
Reviewed-by: Chao Yu <chao@xxxxxxxxxx>
Thanks,