1.7 KiB
Test Case: 48-Bit Extended Compressed Block Count
Test ID: TC158-48bit-compressed-blocks-hi
Category: Inode and VFS Metadata
Priority: Critical
Regression: Extended compressed inodes ignored i_nb.blocks_hi
Objective
Verify Linux-compatible union decoding for an extended compressed inode with
blocks_hi=1, and exact FreeBSD va_bytes/st_blocks values through direct and
file-handle/NFS-style getattr paths.
Fixture
final_review_fixtures.py emits compressed-blocks-hi.erofs as a small seed.
Its manifest records blocks_lo, blocks_hi, block size, exact va_bytes,
st_blocks, and the required sparse provider size. Verify the seed SHA256 before
extending it in the guest.
Procedure
-
Copy the seed in the guest and create the qualified sparse provider:
cp compressed-blocks-hi.erofs compressed-blocks-hi-sparse.erofs truncate -s 17592186056704 compressed-blocks-hi-sparse.erofs -
Attach and mount it read-only with the exact module.
-
Run
final_review_probe stat-blockswith the manifest's expected value. The helper comparesstatandgetfh/fhstatresults. -
Use an FBT entry/return probe on
erofs_getattrto capturea_vap->va_bytes; require the manifest value. -
Read at least one block of
/compressed-blocks.bin, then unmount, detach, shrink/remove the sparse file, unload DTrace, and unload EROFS.
Expected Results
data_blocks == (1ULL << 32) | blocks_lo.va_bytes == 17592186052608.- Direct
statand file-handlefhstatboth reportst_blocks == 34359738384. - The compressed file remains readable; the high block count is allocation metadata, not a physical read address.