# 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 1. Copy the seed in the guest and create the qualified sparse provider: ```sh cp compressed-blocks-hi.erofs compressed-blocks-hi-sparse.erofs truncate -s 17592186056704 compressed-blocks-hi-sparse.erofs ``` 2. Attach and mount it read-only with the exact module. 3. Run `final_review_probe stat-blocks` with the manifest's expected value. The helper compares `stat` and `getfh`/`fhstat` results. 4. Use an FBT entry/return probe on `erofs_getattr` to capture `a_vap->va_bytes`; require the manifest value. 5. 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 `stat` and file-handle `fhstat` both report `st_blocks == 34359738384`. - The compressed file remains readable; the high block count is allocation metadata, not a physical read address.