Re: [RFC PATCH 01/10] ftrfs: add on-disk format and in-memory data structures

From: Aurelien DESBRIERES

Date: Tue Apr 14 2026 - 08:09:48 EST


On Mon, Apr 13, 2026 at 05:11:XX PM +0200, Darrick J. Wong wrote:
> I don't see a block header for indirect blocks, so I guess this
> filesystem only supports mapping ($block_size / 4) ^ 2 +
> ($block_size / 4) + 12 blocks? IOWs, 1049612 of 4KiB blocks,
> or about 4GB of data? Why is isize 64-bit then?

Correct. With 4KiB blocks and 8-byte block pointers, the maximum
addressable file size is (512 + 512^2 + 12) * 4096 = ~1GB, not 4GB.
The 64-bit i_size is inconsistent with the block pointer scheme.

For the intended use case (MRAM/NOR flash on embedded space hardware),
files are small and a ~1GB limit is acceptable. i_size will be
corrected to __le32 in v2, or explicitly documented as capped at ~1GB
with a build-time assert.

Thank you for the precise calculation.

Aurelien DESBRIERES <aurelien@xxxxxxxxxxxx>