# e2freefrag: offline report denominators

A native offline probe on e2fsprogs 1.47.0-2.4~exp1ubuntu4.1 reports 1025
total chunks for a 16 MiB image containing 4096 blocks of 4096 bytes when
the requested chunk is 16 KiB. Geometry supplies 1024 complete chunks.
This is a reporting denominator, not a measure of allocation success.

## Method and replay

Run `PATH=/usr/sbin:$PATH python3 -B probe.py` with Python 3 and e2fsprogs.
The script exclusively creates a new regular file inside a temporary directory,
initializes an ext4 image without a journal, and invokes e2freefrag twice for
each of five chunk sizes. It never accepts a caller-supplied image or device,
mounts anything, or accesses an existing filesystem image. It checks that the
image hash is unchanged by reporting and removes its own temporary image.

The retained observation includes commands, complete reports, binary hashes,
package version, creation-library version and filesystem-creation configuration
hash. An image hash identifies this capture, not a deterministic image format:
timestamps, UUID and local mke2fs defaults can differ between runs. Free-extent
counts may change with those defaults; do not use them as performance rankings.

| Chunk (KiB) | Printed total | Complete regions |
| --- | --- | --- |
| 4 | 4097 | 4096 |
| 16 | 1025 | 1024 |
| 64 | 257 | 256 |

Two invalid options (2 and 3 KiB) were refused. Equality with the 4 KiB block
size was accepted. All five repeated reports agreed; image bytes were unchanged.
These are related observations from one artificial image, not five devices or
independent samples. No statistical interval or speedup is claimed.

## Evidence boundaries

The [v1.47.4 implementation](https://raw.githubusercontent.com/tytso/e2fsprogs/v1.47.4/misc/e2freefrag.c)
retains the extra-denominator expression. Its successful online scan does not
update free_chunks. The latter is source review, not an executed GETFSMAP or
mounted-filesystem test. The native binary tested here is an older packaged
version, not a v1.47.4 build.

Conway et al., [HotStorage 2019](https://www.usenix.org/conference/hotstorage19/presentation/conway),
sections 4-5 and Figure 4, use e2freefrag histograms to describe free space by
extent size. Those histograms and aligned-chunk counts are different outputs.
The paper compares controlled workload histories and measured read costs; the
reporting observation here does not reproduce or invalidate that experiment.

## Files

- probe.py: bounded native procedure; no administrator privileges required.
- results.json: retained complete observation, collected 2026-12-05 UTC.
- verify.py: checks retained evidence without creating a filesystem.
- test_verify.py: parser and evidence-mutation regression tests.

Run `python3 -B verify.py` and
`python3 -B -m unittest discover -s . -p test_verify.py`.
Future corrected versions may legitimately produce different probe output.
The verifier describes this dated capture, not a requirement on future tools.
