Research notes / Capacity semantics
Sparse files, preallocation and thin-pool capacity
13 October 2026 / Updated 1 December 2026
A large file, an allocated file range and available thin-pool capacity are different facts. Preallocation can protect a file against filesystem allocation failure without establishing that every lower storage layer has reserved the resources needed for future writes. Sparse updates can also preserve old destination bytes instead of copying input zeros.
On this page28 sections
Regular is a file type, not a storage guarantee
A regular file presents byte-oriented data rather than a directory, symbolic link or device interface. On Linux, S_ISREG(st_mode) tests this classification. Choose the observation deliberately: stat() follows a final symbolic link, lstat() inspects the link, and fstat() inspects the object referenced by an open descriptor. A pathname check followed by a separate open is not an atomic identity check. [3] [80]
Type, allocation and persistence answer different questions. A sparse regular file can have a logical length larger than its allocated space. A regular file on tmpfs can use virtual memory and swap, yet its contents are lost when that filesystem is unmounted. Even on persistent storage, successful write() completion alone does not establish durability, and syncing file data does not necessarily persist the containing directory entry. Report the file type, filesystem and measurement layer separately before comparing capacity. [3] [81] [29] [82]
A successful status call is not necessarily an atomic metadata snapshot. Linux permits different returned fields to reflect different moments while another process changes the file. A descriptor identifies an opened object, but reading its status does not freeze concurrent metadata updates. [80]
File length, EOF and zero bytes
File size is the logical length of a regular file, including its holes. On Linux, st_size is measured in bytes; st_blocks counts allocated 512-byte units. The current offset is a third quantity: seeking beyond the end changes the cursor without enlarging the file. [3] [2]
For a regular file, a successful positive-count read starting at or beyond the current end of file (EOF) returns zero. A zero-count request can also return zero without testing EOF. Reading a hole before EOF instead transfers zero-valued bytes. A positive short read must not be confused with a zero-byte result. Later growth can make further data available, so EOF is not an immutable-length certificate. [61] [2]
Input type matters: an empty pipe reaches EOF only when no write end remains open. With a writer present, a positive-count read of the empty pipe instead waits or reports EAGAIN in nonblocking mode. Neither condition measures allocated file extents. Record the object type, requested count and returned count before interpreting an empty read. [84]
When a stream keeps its EOF state after growth
A C stream records EOF separately from file length. feof() tests that indicator, and fgetc() returns EOF while it remains set. clearerr() clears EOF and error indicators without moving the stream position; a successful fseek() also clears EOF. Clearing an indicator does not guarantee data. A read error can also produce EOF; check ferror() to distinguish it. [87] [88] [89]
In this native demonstration, each case starts with one byte, A. An independently opened, unbuffered reader consumes it and reaches EOF at offset 1. The writer either leaves the file unchanged or completes a pwrite() of byte B at offset 1. The reader then retries after no reset, clearerr(), or a successful seek back to the same offset.
| File bytes | Reset | EOF before retry | Next result |
|---|---|---|---|
| 1 | none | Set | EOF |
| 1 | clearerr | Clear | EOF |
| 1 | fseek | Clear | EOF |
| 2 | none | Set | EOF |
| 2 | clearerr | Clear | B |
| 2 | fseek | Clear | B |
Growth alone left the stream returning EOF. Both resets exposed B after growth, but returned EOF again without growth. Stream position stayed at 1 through every reset, and every retry left ferror() clear. These are interface observations on one host and C library, not a test of allocation, concurrent scheduling or crash durability.
Reproduce the controls with the C probe and Python runner: python3 run.py --check observations.json. The captured JSON records both runs, compiler, kernel, libc and the source hash. Verifier tests reject missing controls and incorrect outcomes.
A named pipe does not store its stream in the filesystem
A Unix named pipe (FIFO special file) has a filesystem entry, but the kernel passes its payload internally. The pathname is a rendezvous point, not a stored copy of the exchanged bytes. [83]
Pipe capacity limits buffered data, not allocated file extents. The separate PIPE_BUF limit protects small writes from interleaving by other writers; it establishes neither message boundaries nor durable storage. Do not interpret a FIFO pathname or its buffer capacity as a regular-file preallocation guarantee. This is a documented interface distinction, not a new capacity experiment. [84]
Even nominal pipe capacity needs a qualification. On Linux, F_GETPIPE_SZ reports the buffer capacity, while FIONREAD counts unread bytes. Subtracting the latter from the former does not guarantee that a write of the remainder will fit: page-buffer layout and write sizes can leave less usable space. Increasing capacity does not increase the PIPE_BUF atomic-write limit or reserve filesystem blocks. Handle the actual write result and keep the reader draining. [85] [84]
The distinction has historical roots. Ritchie and Thompson's 1978 account of UNIX describes anonymous pipes inherited through a common ancestor, and pipelines that run filters concurrently instead of exchanging temporary files. That describes process connection and data flow, not a modern FIFO capacity guarantee. A named FIFO lets processes find a channel through a pathname; it does not turn the stream into a retained intermediate file. [86] [83]
Start with the layer being measured
On Linux, st_size reports a regular file's logical length in bytes. st_blocks reports its allocation in 512-byte units; st_blksize is a preferred I/O size, not the multiplier for that count. This is accounting, not a proof that every counted block already has a physical mapping. A sparse file can have a long logical address range while consuming fewer allocated blocks. Neither field directly measures allocation in a storage array below the filesystem. [3]
| Observation | Question answered | Still unknown |
|---|---|---|
| File logical length | Where is this file's end? | How much of its range has allocated storage? |
| File allocated blocks | What allocation does this filesystem report for the file? | How much backing space does a lower thin pool have? |
| Filesystem free space | What space does this filesystem report as available? | Are lower data and metadata resources available? |
| Physical-volume size | What size does LVM record for this PV? | Has the underlying device changed size, and which extents are allocated? |
| Volume-group free extents | What extents remain available for LV allocation? | Has an LV or thin pool actually been extended? |
| Logical-volume size | What block address range does this volume expose? | Has its filesystem grown, and is backing space allocated? |
| Thin-pool Data% and Meta% | How much of each pool resource is used? | Can growth or repair finish before workloads need more? |
In Linux LVM, a physical volume (PV) is an initialized block device, which may be a whole device or a partition. A volume group (VG) collects one or more PVs and provides extents for LV allocation. Adding a PV to a VG makes allocation space available; it does not enlarge existing LVs or filesystems. Grouping PVs into a VG does not itself add application-data redundancy. [48] [49] [45]
An application-facing logical volume supplies a block-address space; a filesystem organizes files within it. Increasing the volume size does not by itself enlarge that filesystem. With thin provisioning, exposed logical size and allocated backing space are different again. [45] [5] LVM also uses special thin-pool and cache-pool LV types as pool references, not ordinary block devices for filesystems. [50]
A free-extent total does not guarantee a usable placement. LVM's normal policy avoids parallel stripes on the same PV; contiguous also constrains adjacency. Free capacity can therefore exist without enough eligible extents for a requested layout. Check placement constraints as well as totals; this is not a recommendation to weaken allocation policy. [45]
Device-mapper: an address map is not a capacity guarantee
Device-mapper is the Linux kernel framework behind LVM's block mappings. LVM manages volumes in userspace; a selected kernel target implements their I/O behavior. A linear target maps a range to another block device. That mapping alone supplies neither a second copy nor thin allocation. Identify the target and its backing stack before interpreting an LV's size. [45] [110]
A dmsetup table gives each segment a start, length, target type and target parameters. Its sector addresses use 512-byte units, including the backing offset for a linear target. Do not substitute the drive's physical-sector size: Linux reports logical and physical block geometry separately. [111] [112]
Consider a linear segment starting at virtual sector 0, spanning 8192 sectors, with backing offset 2048. Its length is 4 MiB, and virtual sector 8 maps to backing sector 2056: byte offset 1,052,672, or 1 MiB plus 4096 bytes, relative to the immediate backing device, which may itself be virtual. In general, subtract the segment's virtual start and add its backing offset. This is a calculated address-translation example, not a device test or a claim about reserved physical capacity. Moving the same-length segment's virtual start to 4096 makes virtual sector 4104 map to the same backing sector 2056; adding the virtual sector directly would be wrong. [110]
A table describes the configured mapping; it does not replace the filesystem, volume-group and thin-pool observations above. Keep the address unit, exposed range and available backing resources separate. A device name alone cannot establish which of those resources is exhausted. [5]
Zero-filled reads and failed mappings describe different devices
dm-zero supplies zeros on ordinary reads and silently drops writes. Its exposed address range is not allocated payload storage. A successful write to this target therefore says nothing about retaining the submitted bytes. This is a block-device target, not a writable sparse regular file. [115]
| Operation reaching the mapping callback | zero target | error target |
|---|---|---|
| Ordinary read | Zero-filled completion | I/O error |
| Write | Dropped, successful completion | I/O error |
| Discard | Dropped, successful completion | I/O error |
| Read marked REQ_RAHEAD | I/O error | I/O error |
dm-error returns DM_MAPIO_KILL from its mapping callbacks; the bio-based core completes that result as BLK_STS_IOERR. The zero target rejects readahead-marked reads instead of filling the cache with zeros. These callback results do not describe every application call: caching and deferred writeback above the target matter. [116] [117] [118]
Empty flushes follow a separate path. The core skips a target whose num_flush_bios is zero, and neither reviewed target requests flush bios. Do not infer that every synchronization call must fail on the error target, or that successful synchronization makes a dropped write persistent. [118]
The documented sparse-device construction combines a zero origin with a snapshot and a real copy-on-write device. Changed chunks are retained by that additional layer, whose backing space can run out; they are not retained by dm-zero. A zero-valued read is also not evidence of secure erasure. This comparison is a version-pinned source review, with no block-device or power-loss experiment. [115] [119]
Fault injection needs a coverage argument. IRON File Systems selects block types and workloads, compares faulty runs with controls, and explicitly does not claim every code path is covered. A uniformly failing mapping alone is not that experiment. Our practical inference: distinguish target callbacks actually reached from application calls served by caches; neither count is a field failure rate. [70]
A mapping generator can lose a complete chunk
Adding one sector can reduce the example's mapped range. In the pinned Linux v6.12 reversal tutorial, integer truncation first drops a partial tail; a second subtraction then removes another complete chunk. One chunk is 8192 address sectors, or 4 MiB. The table reports native arithmetic evaluation, not an installed device-mapper table. [113]
| Input sectors | Complete chunks available | Loop iterations | Mapped sectors |
|---|---|---|---|
| 8,192 | 1 | 1 | 8,192 |
| 8,193 | 1 | 0 | 0 |
| 16,384 | 2 | 2 | 16,384 |
| 16,385 | 2 | 1 | 8,192 |
| 24,577 | 3 | 2 | 16,384 |
For nonnegative size S and chunk size E, retaining every complete chunk requires floor(S/E). The audited loop instead runs max(floor(S/E) - indicator(S mod E != 0), 0) times. Below one chunk both produce no rows; at an exact multiple they agree. A positive remainder after at least one full chunk exposes the extra omission. This is an arithmetic reference, not a replacement script safe to run on existing data.
Method and limits: twelve selected sizes, Perl 5.38.2, a separate integer-division oracle, source-hash verification and exact replay. No blockdev, dmsetup, mount or raw-device command was executed. We did not test empty-table acceptance or extreme integer/float boundaries. This is a documentation-example observation, not a kernel-driver defect, vulnerability or estimate of real-world incidence. Method and reproduction, all twelve observations and arithmetic probe.
Changing addresses is not migrating data. Bhadkamkar and colleagues' BORG study distinguishes moving blocks from updating the map that selects their current location. Its reconfigurator holds writes to a source address during movement and the corresponding map update; module removal must return dirty cached blocks to their original locations. The historical prototype's experiments used Linux 2.6.22 and disk busy time. This is a design comparison, not a validation of the tutorial, a BORG reproduction or a performance prediction for current storage. [114]
Resize the filesystem and volume separately
Check resize support at both layers. For ext2/3/4, resize2fs requires an unmounted filesystem for shrinking; mounted expansion depends on filesystem and kernel support. LVM's reduction documentation warns that removed extents lose their data: the filesystem must first be successfully resized to fit the smaller LV, when shrinking is supported. Deleting files alone does not resize the filesystem. Coordinated tools can handle both steps, but volume management alone does not guarantee an online filesystem shrink. [46] [47]
The final row uses LVM's two distinct pool counters. Free VG extents are outside the pool's allocated components until an extension succeeds. A thin logical volume can advertise more capacity than its pool can physically supply. Other storage systems require their own counters and contracts; these Linux examples are not universal names for every array. [5]
The dm-thin guide estimates metadata bytes as 48 * data-device bytes / data-block bytes. When that result is smaller than 2 MiB, the guide recommends using 2 MiB. This is sizing guidance, not a guaranteed reservation: sharing and snapshot changes can change the metadata requirement. Calculating an estimate does not measure current pool headroom. [6]
Size limit is not warning threshold: Linux v6.12 caps the metadata allocation map at 255 * (16384 - 64) * 4096 = 17,045,913,600 bytes (about 15.875 GiB). Its separate oversized-device warning is triggered only above 16 GiB. The driver clamps the metadata-device size it uses to the smaller cap, so absence of that warning does not establish that every byte of the metadata device is usable. This is source-derived arithmetic, not a pool-exhaustion experiment. [79] [78] [17]
Moving extents changes placement, not volume size
Aborting a move need not put every segment back where it started. LVM pvmove relocates selected allocated physical extents within a volume group. Selection can be limited to one LV or a range on the source PV; other extents of that LV may already live elsewhere. Relocation can run while volumes remain in use. It is distinct from enlarging an LV or its filesystem. [pvmove] [Online relocation]
| Operation state | Placement consequence |
|---|---|
| Ordinary move, then abort | Completed segments stay at the destination; unfinished segments stay at the source. |
Move started with --atomic, then abort | The selected movement retains its source placement. |
| Background command returns | Relocation may still be running; this is not evidence of an evacuated PV. |
The first two rows follow the pinned option definitions; the last follows the background-polling contract. "Atomic" describes placement, not rollback of application writes or a point-in-time data snapshot. It does not make removal of a source disk safe merely because the initiating command returned. [Abort and atomic options] [Background completion]
LVM2 v2_03_35 documents an ordinary move as temporary segment mirrors with completed relocations checkpointed in VG metadata. Its atomic path mirrors the selected movement before switching placement. The manual's checkpoint restart is different from abort. The upstream tests also cover selected ranges while retaining unaffected locations; those tests were inspected, not executed here. [Algorithm] [Selection tests]
Check remaining allocations and supported completion status before changing hardware. Eligible destination extents must exist in the VG: filesystem free space alone does not supply them. Even a sufficient free-extent count can fail the allocation policy: normal allocation avoids placing parallel stripes on the same PV. Relaxing that policy changes placement constraints, not available capacity. [Allocation policy] This source review supplies no zero-pause, crash-recovery or failed-device evacuation guarantee. No live volume was moved.
Historical context. Teigland and Mauelshagen's 2001 USENIX paper describes online extent relocation but explicitly warns about crashes during the then-current move operation (section 3.1.3). That warning concerns the implementation described in 2001; it is not a test result for modern LVM2. The checkpoint and abort contracts above come from the separately versioned LVM2 sources, not from projecting today's behavior onto the older system. [Volume Managers in Linux]
A cached free count can prevent a write
A plausible capacity number is not necessarily a fresh allocation count. FAT32 stores an FSInfo free-cluster summary separately from the FAT allocation links. The format allows an unknown sentinel and warns that an in-range count can be wrong. Its signatures identify the structure; they do not establish freshness. The next-cluster field is a search hint, not a declaration that its target is free. [51]
Hesela exercised FatFs R0.16 on a fresh 64 MiB ordinary-file image with 129,021 free 512-byte clusters. Trusting stale counts of zero and one caused a 1,536-byte request to store zero and 512 bytes, respectively. Both returned FR_OK. With FF_FS_NOFSINFO=1 and f_getfree before writing, the FAT was scanned and both writes completed. This is a native designed experiment, not a simulation of the API. [56]
| FSInfo input | Trust: reported clusters | Trust: written bytes | Scan: reported clusters | Scan: written bytes |
|---|---|---|---|---|
| Accurate count | 129,021 | 1,536 | 129,021 | 1,536 |
| Count = 0 | 0 | 0 | 129,021 | 1,536 |
| Count = 1 | 1 | 512 | 129,021 | 1,536 |
| Unknown count | 129,021 | 1,536 | 129,021 | 1,536 |
| Count above geometry | 129,021 | 1,536 | 129,021 | 1,536 |
| Invalid signature, count = 0 | 129,021 | 1,536 | 129,021 | 1,536 |
| Invalid next-cluster hint | 129,021 | 1,536 | 129,021 | 1,536 |
Why it happens: the pinned implementation can accept a bounded cached count without rescanning. Its allocation path treats zero as no free cluster; a successful allocation decrements the cached count. A plausible but stale value can therefore stop allocation before the FAT is exhausted. Unknown or out-of-range counts and the invalid signature triggered recomputation in this sequence. The invalid next-hint control used an accurate count and also completed. [52] [56]
Before each run, both FAT copies and every byte outside primary FSInfo matched the baseline. A separate parser checked the resulting directory entry, chain, length and payload; native close, reopen and readback were also checked. The two builds contain 28 executions of 14 designed combinations, not 28 independent devices. Reproduction instructions, optimized capture, UBSan capture and table data preserve the method and full controls.
Application consequence: check the completed byte count as well as the status. FatFs documents this requirement; FR_OK alone is insufficient. A matching readback prefix is not proof that the entire requested payload was stored. Check close/sync errors separately. [53] Linux v6.12 has its own opt-in usefree policy; this FatFs experiment does not measure the Linux FAT driver or statvfs. [54]
Low free space is not one failure mechanism
A separate historical example helps avoid overdiagnosis. Seltzer et al.'s USENIX 2000 comparison explains that Soft Updates could restart consistently while freed blocks and inodes still awaited reclamation. Background processing reconciled that space. This concerns recovery state in the studied FFS implementation, not FAT32's cached summary. The paper's FreeBSD benchmarks do not measure this FatFs experiment. [55]
Scope: no physical card, power-loss event, Linux FAT mount, concurrent writer, timing or field failure rate was tested. This demonstrates a documented contract under deliberately changed metadata, not a new vulnerability. Preserve the original image when investigating; establish the implementation and counting policy before changing firmware or repairing metadata. Related: FAT cluster chain.
A recovered FAT name can point to different bytes
Allocation, name association and content identity need separate checks. A FAT long filename occupies directory slots before a short-name entry. The slots carry an 8-bit checksum of that entry's 11 raw alias bytes. The checksum excludes the long-name characters, file size, first cluster and payload. A match cannot authenticate the name-to-content mapping. [FAT format]
In a controlled userspace experiment, GNU mtools 4.0.49 created twelve ordinary-file images: FAT12 and FAT16, each with six ASCII name lengths around 13-code-unit slot boundaries. Each contained a target and an equal-length donor. Including twelve unmodified controls, the experiment recorded 80 cases. Each altered image received only one directory mutation. Native directory listing and readback recorded names and payload hashes; repeating the experiment reproduced the complete capture. No device was mounted. [Method and observations]
| Directory mutation | Cases | Observed name | Returned bytes |
|---|---|---|---|
| Unmodified baseline | 12 | Original long name | Target |
| Replace short alias: same checksum | 12 | Original long name | Target |
| Replace short alias: different checksum | 12 | Short alias | Target |
| Edit first long-name character | 12 | Edited long name | Target |
| Redirect first cluster to donor | 12 | Original long name | Donor |
| Flip checksum bit in every long-name slot | 12 | Short alias | Target |
| Reverse physical order of long-name slots | 8 | Original long name | Target |
The first-cluster change deliberately makes two entries share the donor's allocation: it is a constructed cross-link, not a valid rename or a newly discovered defect. Nevertheless, the original long name remains readable while the returned bytes change. A successful read and a plausible name therefore do not establish historical identity.
The pinned Zephyr-maintained FatFs R0.16 patch-2 build read the same 80 images. In all 8 physical slot-order reversals, it displayed the short alias instead of the long name retained by mtools. Both readers returned donor bytes in all 12 deliberate first-cluster rebindings. Agreement on the returned bytes therefore corroborates the current interpretation, not historical name-to-content identity. [Second-reader evidence]
Listing and lookup also differ: all current short aliases opened in FatFs, while 40 original spellings did not. In four cases, the original spelling remained usable through its 8.3 alias after long-name edits or checksum damage. A successful lookup does not by itself show that the long-name slots were accepted. Record the attempted path as well as the displayed name. This Zephyr variant includes disclosed downstream changes; the observations are not a pristine-upstream or mounted-kernel test.
Reader acceptance is another boundary. All eight multi-slot reversals retained their long names in mtools. Linux v6.12's fat_parse_long instead checks a leading final-slot flag and descending ordinals. That comparison is source inspection, not an executed Linux mount or a claim about all recovery tools. [Linux parser]
This distinction fits the methodology of IRON File Systems (SOSP 2005): fault response depends on both the damaged structure and the operation exercised. Its type-aware injection study is methodological context, not validation of these FAT results. The bounded read-only cases here do not characterize repair or write paths. [Failure-policy methodology, section 4]
Preserve the original image and reader version before repair. Compare recovered paths, lengths and content hashes with an independently retained manifest when available. Without that evidence, report the reconstructed association instead of certifying which bytes historically belonged to the name. This FAT12/FAT16 experiment does not test FAT32, exFAT, Unicode edge cases, interrupted writes or physical-media failures.
Complete native capture, repeat capture and reproduction instructions retain all controls. The separate exact alias enumeration also explains why an 8-bit checksum does not imply a universal 1/256 misassociation risk.
Historical-reader safety: mtools 4.0.49 is affected by a documented parser vulnerability. Reproduce these version-pinned observations only with the generated fixtures in an isolated, unprivileged environment, not arbitrary untrusted images. This is not a recommendation to use that release for operational recovery. [Ubuntu security record]
A smaller number need not mean fewer bytes
Normalize the unit before comparing capacity layers. Decimal prefixes give 1 GB = 1,000,000,000 bytes and 1 TB = 1,000,000,000,000 bytes. With binary prefixes, 1 GiB = 1,073,741,824 bytes and 1 TiB = 1,099,511,627,776 bytes. SI prefixes denote powers of ten, not powers of two. [IEC] [NIST]
| Unit | Same byte count |
|---|---|
| GB | 1,000 |
| GiB | 931.322575 |
| TB | 1 |
| TiB | 0.909495 |
Every row describes the same bytes. None measures formatting loss, parity, spares or reserved space. Raw, usable and free capacity each need their own accounting scope; choosing TB or TiB does not select one of those scopes. Read the tool's documented convention rather than assuming every display uses the same unit.
Hypothetical deduction: start with 1 TB of raw addressable capacity and subtract exactly 64 GB for an illustrative overhead budget. The remaining 936,000,000,000 bytes are 936 GB, approximately 871.717930 GiB. The deduction is 64,000,000,000 bytes in either notation: 64 GB or approximately 59.604645 GiB. Do not subtract a GiB number from a GB number. This example assumes only that fixed deduction; it is not a prediction for a filesystem or array.
Prefixes also leave the underlying unit intact: bits, bytes and bytes per second are different quantities. Keep the original integer byte count when available, convert before subtracting, and round only for presentation. The executable conversion example uses exact integer factors and rejects negative, fractional or unsafe-integer byte counts.
Bits, bytes and encoded text
A bit is a binary digit. Modern capacity notation uses an eight-bit byte (B); an octet explicitly means eight bits. Thus 1 Gbit/s converts to 125 MB/s. This is the same rate in different units, not a measured file-copy rate or a deduction of protocol overhead. [Unit definitions] [Octet]
Do not transfer that width assumption blindly to portable C: the C11 draft specifies CHAR_BIT as at least 8, while sizeof(char) is always 1. It counts C bytes, not necessarily octets. [C byte and sizeof]
Text introduces another count. UTF-8 uses one to four octets per Unicode scalar value, so counting code points is not counting encoded bytes. These four scalar values encode as follows; no byte-order mark, separator or terminating zero byte is included. [UTF-8]
| Code point | UTF-8 hex | Octets |
|---|---|---|
| U+0041 | 41 | 1 |
| U+00E9 | C3 A9 | 2 |
| U+20AC | E2 82 AC | 3 |
| U+10000 | F0 90 80 80 | 4 |
The executable encoding example generates the table with the standard UTF-8 encoder. Encoded payload length still does not measure allocated blocks, filesystem metadata or redundant copies. Keep the byte count, encoding and accounting layer together when estimating how much storage a text collection needs.
Eight stored bits need not mean eight bits of uncertainty
Shannon entropy describes uncertainty under a probability model, not allocated space. With base-2 logarithms, H = -sum(p log2 p) is measured in bits. Joint entropy equals the sum of individual entropies only for independent variables. The sum below adds the eight per-position entropies. [Shannon, sections 6-7]
| Source model | Sum (bits) | Joint (bits) |
|---|---|---|
| Eight independent fair choices | 8 | 8 |
| One fair choice repeated eight times | 8 | 1 |
| Always eight zero bits | 0 | 0 |
In the first two models, every bit position is individually equally likely to be 0 or 1. Their dependencies differ: the second model can emit only 00 or FF in hexadecimal. The same marginal balance therefore hides very different joint uncertainty. Our enumerated source model computes the table from all 256 octet probabilities, without sampling. These are not measured compression ratios: a real codec also needs framing, model information and its own treatment of finite inputs.
Compare array capacity on the same accounting basis
Raw capacity adds the capacities addressable on the included devices, not every physical bit of NAND. Device-internal ECC and inaccessible remapping areas are outside that count. [34] [35] Usable capacity, also called formatted capacity, accounts for system overhead such as parity and spares. It is a configured total, not the remaining free space. [36]
A data-reduction ratio compares represented data with its corresponding stored footprint. ONTAP 9.13.1 and later exclude snapshots and thin provisioning from this ratio; earlier displays differ. [37] Other products use different conventions: the HCI 1.9 dashboard has an EFFECTIVE view of provisioned storage with optional thin-provisioning efficiencies. Record the product, version, counter and included features before comparing ratios. [38]
Add bytes before combining reduction ratios
Hypothetical aggregation: two disjoint populations each represent 100 TB of logical data. One occupies 100 TB; the other occupies 25 TB. Their individual ratios are 1:1 and 4:1, but the combined ratio is 200 / 125 = 1.6:1, or 37.5% savings. The simple mean, 2.5:1, is not the combined ratio.
Add the logical bytes and physical bytes separately, using consistent units, observation times and accounting rules. This arithmetic assumes non-overlapping physical footprints and fixed overhead. If deduplicated blocks appear in several volume reports, use a pool total or a documented allocation that counts each physical block once. This is an accounting derivation, not an array measurement.
Population selection matters too: PowerStore distinguishes an overall ratio for a resource family from a ratio for reducible data only. [40] Our planning inference is that the reducible-only ratio cannot describe an entire workload without accounting for its unreducible portion. Record the selected population alongside the ratio.
Two different meanings of effective capacity
Under the SNIA convention, effective capacity combines already-stored logical data with unused formatted capacity. Multiplying total usable capacity by the current reduction ratio is instead an extrapolation: it assumes future data achieves that ratio. [39]
Hypothetical example: 100 TB usable, with 60 TB of logical data occupying 30 TB. All values use decimal TB and the same accounting scope. Overheads are already excluded from the 100 TB; no snapshots, changing reserves or additional metadata growth are modeled.
- Current data-reduction ratio
- 60 / 30 = 2:1, or 50% fewer stored bytes.
- Unused formatted capacity
- 100 - 30 = 70 TB.
- Current effective capacity, SNIA convention
- 60 + 70 = 130 TB.
- Constant-ratio full-capacity estimate
- 100 x 2 = 200 TB.
If additional retained data needs one physical byte per logical byte, with the existing dataset unchanged, the remaining 70 TB holds only 70 TB more, for 130 TB total. The 200 TB extrapolation then overstates the eventual logical total by 70 TB. Advertising 500 TB of thin volumes creates address space, not 500 TB of physical headroom or evidence of a 5:1 reduction. A zero-footprint sample supplies no finite reduction ratio for this forecast.
For planning, retain the byte-unit convention, represented-data population, physical footprint and unused backing space separately. Allow for operational headroom and changing data before treating an efficiency ratio as a growth budget. These calculations illustrate the definitions; they are not measurements of an array.
Budget for the next data, not only the old ratio
A current ratio describes a stored population; it does not establish the footprint of the next logical byte. Consider a deliberately simplified incoming mix: fraction f of incoming logical bytes reduces at ratio r, while the rest costs exactly one physical byte per logical byte. With separate, additive footprints, the physical cost per logical byte is (1 - f) + f / r. Its reciprocal is the incoming ratio. This is our accounting derivation, not a PowerStore counter formula or measurement.
Hypothetical planning budget: keep the previous 60 TB of logical data and its 30 TB footprint unchanged. Of the 70 TB currently free, leave 10 TB unused as policy headroom. That leaves 60 TB for modeled additional data. The 10 TB is an illustrative policy choice, not a recommended universal margin or an enforced storage reservation.
| Reducible share of incoming logical bytes | Combined incoming ratio | Additional logical data |
|---|---|---|
| 0% | 1:1 | 60 TB |
| 50% | 1.6:1 | 96 TB |
| 100% | 4:1 | 240 TB |
At 50% reducible bytes, the cost is 0.5 + 0.5 / 4 = 0.625 physical bytes per logical byte. Thus 60 / 0.625 = 96 TB can be added in this model, for 156 TB logical in total. Keeping the old 2:1 ratio with the same 10 TB headroom would instead give 60 + 60 x 2 = 180 TB. The 24 TB difference comes from the assumed incoming mix. The earlier 200 TB full-fill extrapolation also uses the last 10 TB of free space, so it is not a same-policy comparison.
The current SNIA effective-capacity snapshot remains 130 TB before any write. After the modeled 96 TB addition, a new snapshot would be 156 TB stored logical plus 10 TB unused formatted capacity, or 166 TB. A planning limit, a present accounting measure and a later accounting measure answer different questions.
Limits: the model holds the existing dataset and overhead fixed. It excludes cross-population deduplication, snapshot retention growth, allocation granularity, metadata expansion, changing reduction and competing writers. Even nominally unreducible data can need more than 1:1 space when overhead grows. Product-specific accounting must be checked separately. No confidence interval is implied: these are selected scenarios, not sampled observations or a capacity guarantee.
The standalone calculation source exposes the inputs, formula and scenarios without dependencies. Its input checks reject nonfinite numbers, out-of-range fractions, ratios below one and headroom larger than current free space.
A sample ratio is not a population estimate
Harnik, Khaitzin and Sotnikov's FAST 2016 paper estimates unseen duplication from a duplication-frequency histogram. Its ratio convention is retained fraction D / N, not the reciprocal logical-to-stored ratio used above. Its evaluation excludes zero chunks, and its range slackness is empirically tuned. Do not interpret those ranges as a universal fixed-confidence guarantee. [41]
Read granularity is not deduplication granularity
Section 3.4 of the paper groups reads into larger super-chunks and orders them by position to reduce HDD sampling cost. It then splits those reads into smaller chunks for duplicate counting: a larger read is not a larger deduplication unit. The authors describe unchanged expected histogram counts and increased variance, then widen the range slackness for their grouped sampling strategy.[41, section 3.4] This is not a general consequence of equal inclusion probabilities: the fixed-size control below changes expected histogram counts too. Record both granularities, the selection rule and where duplicate copies lie. Reading fewer bytes alone establishes neither a faster scan nor equivalent statistical evidence.
Two samples, two different populations
Section 3.2 separates two low-memory methods. A base sample drawn from chunk positions retains frequencies for its selected content and estimates the sampled histogram. The streaming alternative retains the highest-ranked distinct content hashes, runs Unseen on that restricted hash domain, then scales its estimated distinct count by the covered domain fraction. [41]
A frequent identity is more likely to enter a position sample than a rare one; uniform selection among distinct identities removes that frequency weighting. Swapping these samples without changing the estimator changes the question. Record whether selection acts on positions or content identities, alongside the physical read size. The base sample must cover the dataset before the main scan; the paper's streaming alternative supports later merging of separately scanned volumes. [41]
Fifteen possible samples, an exact expectation
Our constructed example: six equal-sized chunk positions contain A, A, B, B, C, C. Perfect deduplication stores three chunks, so the full population has a 2:1 logical-to-stored ratio. Choose two distinct positions uniformly without replacement. Of the 15 equally likely pairs, three contain one identity and twelve contain two. We enumerate every pair; this is not a random trial.
| Distinct chunks in sample | Number of pairs | Sample logical/stored |
|---|---|---|
| 1 | 3 / 15 | 2:1 |
| 2 | 12 / 15 | 1:1 |
The mean sample ratio is (3 x 2 + 12 x 1) / 15 = 1.2:1, not 2:1. Mean retained fraction is 0.9; inverting that mean gives 10/9, not the mean reciprocal 6/5. Neither operation repairs missing duplicate matches outside the sample. This exact finite example demonstrates a possible bias, not the bias of every estimator.
Different savings, exactly the same sample evidence
The difficulty is not limited to a biased sample ratio. Our exact counterexample compares two six-position populations, using equal-sized chunks and choosing two positions uniformly without replacement. The observation is only the unlabeled frequency histogram: how many identities appeared once, twice, and so on. This is the statistical meaning offingerprint in Valiant and Valiant, not a content hash. [98, definition 1]
| Six chunk positions | Unique chunks | Saved payload fraction |
|---|---|---|
A, A, A, B, C, D | 4 | 1/3 |
A, A, B, B, C, C | 3 | 1/2 |
Each population has three matching pairs among the 15 possible position pairs. Thus both give two different identities with probability 4/5, or one repeated identity with probability 1/5. These are all possible histogram outcomes: the entire observed distribution is identical, not just one selected sample or its mean. An estimator given only this histogram and the population and sample sizes therefore cannot be unbiased for both unique counts. Extra randomness independent of the population does not distinguish them either.
The boundary matters: three-position samples can contain a triple with probability 1/20 in the first population and zero in the second; a full census separates them. Labels, position information and prior workload knowledge are excluded from this observation model. This does not make sampling useless, disprove Unseen, or set a universal minimum sample percentage.
Grouping can change the expected histogram too
Keep two copies each of A and B, and read exactly two of the four equal-sized positions. Every position has inclusion probability 1/2 in each design below. Let y_1 count identities seen once and y_2 identities seen twice. The expected number of sampled occurrences stays two, but the histogram means do not:
| Read design | Mean y_1 | Mean y_2 |
|---|---|---|
| Two positions chosen uniformly | 4/3 | 1/3 |
| One group: [AA] or [BB] | 0 | 1 |
| One group: [AB] or [AB] | 2 | 0 |
Linearity of expectation sums the probabilities of seeing each identity exactly i times; equal per-position inclusion does not fix those probabilities. This fixed-size illustration is not the paper's approximate-fraction hash sampler, a replay of its workloads, or a calibrated uncertainty interval. It identifies an assumption to check before transferring a sampling transform to grouped reads.
Reproduce: the canonical derivation and sampling contract, exact Python enumeration, JSON results and independent controls live in the corpus. These are constructed mathematical examples, not fleet measurements or physical-capacity forecasts. Compression, metadata, allocation and replication are excluded. [99]
The same duplicate counts can hide different byte savings
Harnik et al.'s baseline uses fixed-size chunks. [41] Variable-length segments are a real design choice: Zhu, Li and Patterson describe them in DDFS, together with per-segment size information. Their discussion also identifies the metadata cost of smaller segments. [42] A count-only histogram therefore cannot generally determine payload-byte savings.
Our constructed counterexample: each population contains four copies of A and one of B. In both, two distinct identities occupy five positions, so the count ratio is 5/2 = 2.5:1 and the histogram has one identity at frequency one and one at frequency four. Change only which identity is longer:
| Population | A / B sizes | Logical payload | Unique payload | Payload-byte ratio |
|---|---|---|---|---|
| Repeated small chunk | 1 / 4 KiB | 8 KiB | 5 KiB | 1.6:1 |
| Repeated large chunk | 4 / 1 KiB | 17 KiB | 5 KiB | 3.4:1 |
The retained payload is 5 KiB in both cases, but the logical totals are 8 and 17 KiB. The byte ratios are 1.6:1 and 3.4:1, despite identical count histograms. For distinct identity j with length b_j and multiplicity n_j, use sum(n_j * b_j) / sum(b_j). Equivalently, retain the sum of unique payload bytes B_i in every frequency bin i and compute sum(i * B_i) / sum(B_i).
Record both counts and byte weights. A mean size across all occurrences cannot substitute for the mean size across distinct identities. These are exact accounting examples, not measured DDFS results, a chunker benchmark or a physical-capacity forecast. Indexes, references, compression, replicas and allocation padding remain outside this payload-only model.
Multiply successive stages, not mismatched populations
The paper also studies dependence between duplication and compressibility. [41] Our separate hypothetical example assigns four-byte chunks A and B compressed sizes of one and four bytes. Store four copies of A and one of B: 20 logical bytes, 8 unique uncompressed bytes and 5 unique compressed bytes. These sizes are assumptions; no compressor was run.
Deduplication alone gives 20/8 = 2.5:1. Compressing all five copies also gives 20/8 = 2.5:1, but their product 6.25:1 is wrong for the combined footprint. Compression after deduplication gives 8/5 = 1.6:1. The matching stages cancel correctly: (20/8) x (8/5) = 20/5 = 4:1.
Reproduction: dependency-free calculation and generated exact fractions and counts. This is not an implementation or replication of Unseen. The examples assume exact identity, perfect matching and no metadata, replication or allocation overhead. They neither estimate a real workload nor predict future writes. Record the sampling design and the population at each processing stage before using a ratio for sizing.
Read the counter population before combining ratios
A deduplication ratio isolates duplicate sharing; a compression ratio compares bytes before and after compression. Their labels alone do not identify the intermediate population. The cancellation above requires the very same unique-byte total, observation time and overhead boundary in both stages.
| Counter | Documented population |
|---|---|
| OpenZFS 2.3 compressratio (non-snapshots) | Used space, including descendants; clone space shared with its origin is excluded. |
| OpenZFS 2.3 refcompressratio | Space referenced by the dataset. |
| vSAN ESA 9.1 compression ratio | Data selected as compressible. |
| vSAN ESA 9.1 deduplication ratio | Objects eligible for deduplication. |
OpenZFS documents the first distinction and treats snapshot compressratio as refcompressratio. Its logicalused counter also includes metadata and ignores compression and copies; it is not simply an application's payload-byte count. [95] Broadcom documents the two selected vSAN populations separately. Those descriptions do not establish that the displayed ratios are successive stages on identical bytes. [96]
Accounting checklist: record each numerator and denominator, included objects and versions, timestamp, and treatment of references, dictionaries, metadata, replicas and allocation padding. Add excluded overhead once when deriving an all-in footprint. A zero denominator supplies no finite sizing ratio; 0/0 is undefined. These are accounting checks, not a claim that any product reports incorrect values, nor a new ZFS or vSAN experiment.
Repeated content still needs a reconstruction map
Meister, Brinkmann and Suss study file recipes: ordered chunk references needed to rebuild files. Their FAST 2013 evaluation uses three backup traces and separates recipe storage from the unique chunk index. Compressing recipes can reduce their footprint, but some methods add index or dictionary state. Thus a payload-only deduplication ratio does not describe the whole stored representation. [97]
Constructed accounting: retain n occurrences of one 1024-byte chunk and charge 32 bytes per occurrence for an uncompressed reference. Store the chunk once. Logical bytes are n x 1024; payload plus references occupy 1024 + n x 32 bytes. The reference size is an assumption, not a paper measurement or a fingerprint recommendation.
| Occurrences | Logical bytes | Recipe bytes | Payload + recipe bytes | Logical / stored |
|---|---|---|---|---|
| 1 | 1024 | 32 | 1056 | 32/33 |
| 32 | 32768 | 1024 | 2048 | 16/1 |
| 320 | 327680 | 10240 | 11264 | 320/11 |
At 32 occurrences, the payload-only ratio is 32:1 but payload plus recipe gives 16:1. Under these fixed assumptions, n x 1024 / (1024 + n x 32) approaches 32 as n grows. This is not a universal deduplication limit: shared or compressed recipes change the model. Unique-chunk indexes, file metadata, replicas and allocation padding are still excluded. Check the exact calculation and regression tests.
Free for whom? Blocks, inodes and quotas
A filesystem can report free blocks while a particular workload cannot allocate more. With statvfs(), f_bfree counts free blocks; f_bavail counts those available to unprivileged users. Convert either to bytes using f_frsize, not st_blocks' 512-byte unit or st_blksize. Inode counts are separate: f_ffree and f_favail. Not every field is meaningful on every filesystem. [26]
Ext4 separates reserve accounting from permission to allocate. In Linux v6.12, ordinary ext4 f_bavail accounting subtracts configured reserved blocks and an internal reserve, with a floor of zero. It does not test the caller's reserved-block privileges. Project-quota adjustment can then replace the counters. The difference between f_bfree and f_bavail is therefore not universally the configured reserved-block count. [62]
The allocation check separately considers the reserved user, membership of a configured nonzero reserved group, CAP_SYS_RESOURCE and internal flags. Eligible credentials may pass that check despite zero ordinary availability; this is not a write-success guarantee. [63] tune2fs documents the configured reserve and eligible user/group settings. Changing that reserve changes allocation policy, not the capacity of the device or lower thin pool. [64] This is source review, not an ext4 exhaustion experiment.
Historical evidence has a workload boundary. McKusick and colleagues' 1984 FFS paper describes reserving free blocks so its layout policy retains placement choices; below the threshold, only the administrator could allocate. Table II used a 10% reserve on a VAX 11/750 with an AMPEX disk, without competing CPU or disk-arm activity. This is not a recommended reserve percentage for ext4 or SSD workloads. [65]
Filesystem quotas constrain usage by user, group or project, independently of a lower thin pool. Space and inode limits are separate resources. An enforced soft limit permits a temporary excess during its grace period, subject to the hard limit and other constraints. Expiry blocks further allocation of that resource until usage falls below the soft limit or the policy changes. Hard-limit behavior and privileged exceptions must be read in the implementation's contract. [27] [28] XFS also distinguishes accounting from enforcement: a usage record does not prove that limits are active. [30]
Do not assume the counters always ignore quotas. In Linux v6.8, XFS applies project-quota adjustments when the queried inode has project inheritance and project accounting and enforcement are enabled. Its quota helper can replace filesystem-wide totals and free counts with project-scoped values. The helper selects a nonzero soft limit before the hard limit and subtracts reserved usage, clamping at zero when it applies the limit. It does not consult the grace timer. A zero reported count therefore does not, by itself, prove that the grace period has expired. This is a versioned implementation example, not a universal formula for every user's remaining allowance. [31] [32]
Diagnostic consequence: preserve the failing operation, transferred byte count and, on an error return, errno. A positive short write reports progress, not a valid accompanying error code. Linux write() distinguishes EDQUOT for exhausted block quota from ENOSPC for lack of data space, and can complete only part of a request. [29] Collapsing these outcomes into a single "disk full" message discards useful evidence. Creating a file also needs an inode, so a byte-only capacity check is incomplete.
Record the target mount, relevant user/group/project limits, enforcement state, inode availability and lower-pool headroom together. This is a diagnostic checklist, not a guarantee that a later write will succeed: other writers and policy changes can intervene. A statistics query does not reserve a file range and does not replace the successful preallocation contract below.
A hole is a file-level zero-reading range
Seeking beyond end-of-file does not enlarge the file by itself. A later write at that offset leaves a gap that reads as zeros. This supports sparse files, but not every zero-filled range is a hole. SEEK_DATA and SEEK_HOLE are filesystem-dependent hints: an implementation may report all offsets as data and only EOF as a hole. They are not an exact physical allocation map. [2]
With hole punching, data in the selected file range is deliberately removed. Whole filesystem blocks can be deallocated; partial boundary blocks are zeroed. The logical length stays unchanged. This changes file content and is not a harmless capacity probe. [4]
Preallocation is a real, scoped guarantee
Linux documents successful fallocate(fd, 0, offset, length) as allocating the range so later writes there do not fail for lack of disk space. FALLOC_FL_KEEP_SIZE prevents extending the file's logical length. That is a meaningful allocation contract, not merely a performance hint. [1]
However, the util-linux manual describes fast file preallocation through uninitialized blocks without I/O to the data blocks. LVM documents thin-pool backing being allocated when blocks are written. Our layer-boundary inference: a filesystem reservation is not evidence that all lower thin-pool data and metadata resources have been reserved. This does not negate the filesystem contract or imply every preallocated write will fail. [4] [5]
Allocation is also not durability. Successfully reserving an unwritten range does not establish that later application data reached persistent storage. That requires a separate write and synchronization error-handling contract.
A quota ceiling and a backing reservation do different jobs
A quota limits a consumer; a reservation protects capacity from competing consumers. Do not treat the first as evidence of the second. The 2008 USENIX paper by Edwards and colleagues, FlexVol: Flexible, Efficient File Volume Virtualization in WAFL, makes this distinction concrete. Section 4.3 describes three policies: volume reserves at the aggregate level; none leaves unallocated capacity unreserved; file honors selected object reservations in the aggregate. [33]
This is a historical architecture example, not current ONTAP configuration advice or a Linux fallocate() guarantee. The useful design question is: which component records the reservation, and which competing allocations must respect it? A system can deliberately propagate a reservation across layers; a successful operation in one layer alone does not establish that it did.
Preallocation APIs have different failure contracts
posix_fallocate() returns an error number directly; test for a nonzero return, not for -1 or a new value in errno. Linux fallocate() instead returns -1 on failure and sets errno. Confusing these conventions can turn a failed reservation into an apparent success. [11] [1]
The implementation matters as well as the API. In the pinned glibc 2.40 Linux source, posix_fallocate() first tries the native allocation syscall with mode zero. EOPNOTSUPP selects the library's fallback; other native errors are returned to the caller. This is a versioned implementation detail, not a rule for every C library. [12]
That fallback probes bytes and conditionally writes zeros to obtain allocation. Another writer can change a byte between the probe and the write, so this is not an atomic check-and-reserve operation. The manual also warns about concurrent file growth and fallback-specific descriptor restrictions. These warnings do not mean every native allocation call has the same race. [13] [11]
Engineering implication: decide whether emulation is acceptable under the application's concurrency model. Using native fallocate() and treating unsupported operation as a failure avoids silently taking this library fallback; adding an unreviewed zero-writing fallback recreates its risks. Neither choice establishes data durability or reserves every lower thin-pool resource.
A small, reproducible error-path check
The companion C test calls both APIs with an invalid descriptor and checks their distinct error conventions. It never opens or changes a file. The recorded result includes the compiler, kernel, libc and source hash. This checks error handling only: it does not exercise allocation, trigger emulation or reproduce a concurrency race.
The same zeros can mean opposite allocation changes
The util-linux --zero-range operation can preallocate holes and represent zeros using unwritten extents. By contrast, --punch-hole removes whole blocks while retaining file length. Both can produce zero-filled reads. Readback alone therefore cannot tell whether space was allocated, released or physically overwritten. Check operation support and allocation at the layer of interest. [4]
Even a decrease in filesystem allocation does not prove immediate backend reclamation. Discard handling, chunk boundaries and blocks retained by thin snapshots matter. no_discard_passdown removes thin mappings without forwarding discard to the data device; ignore_discard disables discard handling instead. [5] [6] The separate discard analysis explains why reclamation and sanitization must not be conflated.
Windows validity advancement can expose old bytes
Windows stream metadata separates AllocationSize, FileSize and ValidDataLength. SetEndOfFile changes file size; its documentation does not define the contents of an extended tail. Do not import Linux allocation guarantees into a differently named Windows operation. [107] [106]
| Field | Describes | Does not establish |
|---|---|---|
AllocationSize | Space allocated for the stream. | Which bytes the application initialized. |
FileSize | The logical byte length. | A defined value for the tail extended by SetEndOfFile. |
ValidDataLength | The valid-data boundary. | That the application wrote each byte before an explicit validity advance. |
SetFileValidData advances validity without initializing bytes. Earlier disk contents may become readable. While exposed ranges remain unwritten, access restrictions must account for interrupted writes and later copies, not only concurrent readers. A successful call is not proof of application-written payloads. [105]
The separate MS-FSCC FileValidDataLengthInformation contract permits a positive signed 64-bit length above the current VDL and no greater than file size. It lists privilege and sparse/compressed-file rejection conditions. [108] The Win32 page has conflicting equality and network-support language, so those details are not generalized here. This is a documentation comparison, not a Windows experiment or an optimization recommendation.
A separate problem appears in striped storage: a missing local chunk can mean a hole or EOF. Stender et al.'s 2008 XtreemFS protocol consults distributed size bounds when local information cannot decide; truncation adds an ordered epoch. That historical design illustrates why absence alone cannot identify a file boundary, not how Windows implements validity. [109]
Measured example: identical zeros, different allocation
We ran the same four-step sequence on three freshly created 1 MiB temporary files. All 1,048,576 bytes were read and checked after each step; every byte was zero. The filesystem nevertheless reported alternating allocated sizes. The table shows the first run; the other two produced identical reported counts and extent flags.
| Step, in order | Logical bytes | Allocated bytes | Nonzero bytes | FIEMAP result |
|---|---|---|---|---|
| Extend with ftruncate | 1,048,576 | 0 | 0 | No extents returned |
| Native preallocation | 1,048,576 | 1,048,576 | 0 | Flags 0x801 |
| Punch hole, keep size | 1,048,576 | 0 | 0 | No extents returned |
| Zero range, keep size | 1,048,576 | 1,048,576 | 0 | Flags 0x801 |
Here, 0x801 combines UNWRITTEN and LAST. Allocated bytes are st_blocks multiplied by 512, not a backend capacity reading. Each observation follows a successful fsync(); the subsequent FIEMAP request uses flags zero. This deliberately measures synchronized states, not transient delayed allocation. [8]
What this establishes: in this environment, zero-filled readback alone could not distinguish a hole from allocated, unwritten storage. It does not measure SSD erasure, thin-pool reclamation, crash survival or performance. Three repetitions on one host are not a representative filesystem sample; no statistical confidence interval or cross-filesystem ranking is inferred.
Reproduction materials: C source, Node runner and all three runs in JSON. The record includes mount options, compiler, libc, kernel and source hashes. The runner creates and removes its own temporary files and stops on unsupported operations without substituting an emulation. This is an original small observation, not a reproduction of the FAST paper discussed below.
A hole query can return EOF without accepting EOF as input
SEEK_DATA and SEEK_HOLE classify logical byte ranges, not nonzero bytes or exact physical allocation. The filesystem may conservatively report every byte as data and only EOF as a hole. A sparse-aware copy must remain correct under that valid fallback. [2]
In Linux v6.8's generic and iomap implementations, both modes reject a starting offset at or beyond the file size with ENXIO. However, a hole query starting below EOF can return EOF. Stop a stable-file walk when its cursor reaches the captured size; do not require another successful seek at that position. A data query also returns ENXIO when no reported data remains. Unsupported-operation and I/O errors must not be silently converted into a successful end-of-scan. [100] [22]
Seeking is not a read-only cursor inspection. A successful seek through dup() changes the offset used by the original descriptor too. pread() avoids that cursor interference but can return a short read. A separately opened file has an independent cursor, not frozen contents; reopening a mutable pathname also requires checking that it still identifies the intended file. [101] [102] [103]
Four fresh files, explicit endpoint checks
A controlled observation used an empty file and three 16,384-byte files: one extended without writes, one filled with zeros, and one with 4,096 nonzero bytes at offset 4,096. Preparation ended with checked fsync(). Queries preceded complete pread() verification because reads can affect later classification. The recorded environment was Linux 6.8.0-149-generic on ext4.
| Prepared file | Size | HOLE from 0 | DATA at EOF | HOLE at EOF |
|---|---|---|---|---|
| empty | 0 | ENXIO | ENXIO | ENXIO |
| unwritten-zeros | 16,384 | 0 | ENXIO | ENXIO |
| written-zeros | 16,384 | 16384 | ENXIO | ENXIO |
| mixed | 16,384 | 0 | ENXIO | ENXIO |
All complete readbacks matched the preparation oracle, and all reported hole ranges read as zeros. In the mixed-file cursor check, seeking through the duplicate moved the original descriptor from 17 to 8192 bytes. The separate open stayed at zero; positional readback left the shared cursor unchanged. The reproducible probe, JSON receipt, regression tests and method retain the exact preparation and environment.
This is one host with private files and no concurrent writers, not a physical-capacity measurement or crash test. The tests accept conservative all-data maps, reject invalid progress, preserve real errors and accumulate short reads. Operational inference: per-call locking in the reviewed ext4 seek implementation does not make several seeks and reads a snapshot. Use a stable source or an appropriate consistency mechanism; another descriptor alone does not supply one. [21]
Unwritten allocation and seek holes are different concepts
A file extent maps a run of file blocks to storage blocks. Ext4 represents contiguous runs with a start and length instead of a separate mapping for every block. [7] An unwritten extent already has allocation but returns zeros through the filesystem; its underlying device contents are not thereby defined. [8]
FIEMAP distinguishes UNWRITTEN from DELALLOC: delayed allocation has data but no assigned physical location yet. These are different allocation states. A SEEK_HOLE result is a separate classification and can include allocated, unwritten ranges, as the read experiment below shows. Extent mappings can also change between calls. Do not use reported offsets to bypass a mounted filesystem and access its block device; the FIEMAP documentation explicitly rules out that use. [8]
DELALLOC also carries UNKNOWN, but UNKNOWN alone need not mean delayed allocation. A query using FIEMAP_FLAG_SYNC synchronizes the file before mapping it, so it is not a passive view of the earlier allocation state. Record the query flags when comparing observations. No assigned physical location does not, by itself, prove the absence of a filesystem accounting reservation. [8]
The mapping query can change the state it reports
A nonzero block count need not mean placement is complete. In the pinned Linux v6.8 source, ext4_file_getattr() adds reserved delayed-allocation blocks to the count returned by stat. Accounting reservation and assigned location are distinct. This source explains a possible observation; it is not a claim that every filesystem counts reservations this way. [14]
We tested that distinction on 9 fresh 1 MiB files: three repetitions of each sequence below, on the same ext4 filesystem and Linux 6.8.0-146-generic. Buffered writes filled every byte with a deterministic nonzero pattern. Each first mapping used request flags zero; each query was bracketed by fstat(). Complete readback after the second mapping found no changed bytes.
| Second observation | Before | After | Unchanged block count |
|---|---|---|---|
| Repeat without sync | 3 / 3 | 3 / 3 | 3 / 3 |
| Explicit fsync | 3 / 3 | 0 / 3 | 3 / 3 |
| FIEMAP sync flag | 3 / 3 | 0 / 3 | 3 / 3 |
In all recorded observations, st_blocks was 2,048, equivalent to 1,048,576 accounting bytes. Before intervention the mapping flags were 0x7 (LAST | UNKNOWN | DELALLOC). The control retained those flags; both synchronization arms returned 0x1 (LAST) afterward. The same byte count therefore described different mapping states.
FIEMAP with FIEMAP_FLAG_SYNC requests synchronization before mapping. It answers a different question from observing the unsynchronized write path. Record request flags and operation order; an absent DELALLOC after that query does not show that delayed allocation was never used. [8]
Writeback is not the full fsync contract: upstream Linux v6.8's fiemap_prep() handles FIEMAP_FLAG_SYNC with filemap_write_and_wait(), not fsync(). The flag therefore must not substitute for an application's metadata-durability barrier. This is a pinned upstream implementation, not an audit of every downstream kernel patch. [16]
Counting extents does not reserve a snapshot
A count-only request (fm_extent_count = 0) sizes a later buffer; it does not freeze the mapping between calls. Returned extents may cross the requested range boundaries. LAST can mean the last extent in the queried range on some implementations, not necessarily end-of-file. A full buffer therefore needs a completeness check, not silent acceptance. Unsupported flags return EBADR and identify the rejected flags in fm_flags; dropping them changes the requested contract. [8]
Collector scope: our fixed-size nonzero-file experiment rejects a saturated map without LAST and separately verifies logical coverage. It does not implement a general paginated sparse-file mapper. Neither retrying a query nor concatenating batches establishes a point-in-time snapshot.
Limits: background writeback can race with either query, and fstat() plus FIEMAP is not an atomic snapshot. The control is a repeated query, not a timing-matched treatment. Repeats may observe already-written extents; the runner accepts that outcome. These nine files do not support a population confidence interval. Identical mapping flags after the two interventions do not establish equivalent durability contracts or survival of a power failure.
Historical context: Cao, Bhattacharya and Ts'o's 2007 ext4 workshop slides already separated reservation from deferred placement. Slide 22 describes reserving space before writeback, while slide 18 labels delayed allocation as work in progress. This is evidence of design intent at that date, not the API or implementation of today's kernel. [15]
Reproduce and inspect the observation: original C source, runner and all measurements and provenance. Only private temporary files were changed. No raw-device access, mount changes, global cache dropping, thin-pool tests or performance measurements were performed.
A checksum read can change the next sparse copy
Equal bytes do not establish equal allocation. In a controlled GNU cp 9.4 observation, a zero-filled 1 MiB source with its first 512 KiB preallocated produced a default copy with 0 allocated bytes without a source preread, or 524,288 after a full preread. Every destination matched the expected bytes and length. The fully preallocated control did not show that change. These are filesystem counters, not device-write totals.
First separate the read effect from the copier
An earlier experiment used 40 fresh files: four fixture types, ext4 and tmpfs, 5 repetitions each. On ext4, reading a fully preallocated file changed its SEEK_DATA classification from no data to the whole file. Reopening preserved the answer; per-file DONTNEED advice reversed it; rereading restored it. Allocation stayed at 2,048 units of 512 bytes, and the logical FIEMAP descriptors stayed UNWRITTEN | LAST. This shows why a range reported by SEEK_HOLE need not be unallocated. The tmpfs preallocation control did not show that transition.
The pinned upstream Linux v6.8 path explains a mechanism consistent with this observation: ext4 delegates these seeks to iomap; iomap consults the page cache for unwritten extents; an uptodate folio can be classified as data. The read need not initialize the on-disk extent. This is an explanation from upstream source, not an assertion that Ubuntu's kernel is byte-identical to that tag. [21] [22] [23]
GNU cp adds its own decision boundary
The follow-up measured 336 copies: two filesystems, seven source layouts, four option combinations, two preread conditions and three repetitions per cell. Each copy used a fresh source and destination. This selected table includes a negative control; the complete JSON retains all cases, including nonzero data islands.
| Source / copy policy | Allocated bytes |
|---|---|
| Half preallocated / default | Without preread: 0. After preread: 524,288. |
| Half preallocated / always, no reflink | Without preread: 0. After preread: 0. |
| Half preallocated / never, no reflink | Without preread: 1,048,576. After preread: 1,048,576. |
| Fully preallocated / default | Without preread: 1,048,576. After preread: 1,048,576. |
GNU coreutils v9.4 checks allocated blocks before trying SEEK_DATA. The half-preallocated file qualified for that path; the fully preallocated file did not. Four separate syscall witnesses corroborated the distinction: default cp used copy_file_range for the whole fully preallocated file in both conditions, but copied either no payload or a 524,288-byte range for the half-preallocated file. Default clone attempts returned EOPNOTSUPP here; no successful reflink explains these results. [24]
The explicit policies pair --sparse=always or --sparse=never with --reflink=never. They are option combinations, not isolated sparse-flag treatments: v9.4 also disables its copy_file_range optimization when reflinks are forbidden. The manual's zero-run policy does not promise to reconstruct unwritten extents. [24] [25]
Content preservation is not reservation preservation
Engineering implication: when the application requires reserved space after restore, establish and check the required destination allocation separately. A matching checksum cannot certify that property. Conversely, a different block count does not by itself prove corrupted content. Dense allocation is not proof of identical extent state or capacity reserved through every lower layer. [1]
The retained observations were recorded on 20 October 2026 with Linux 6.8.0-146-generic, GNU cp package 9.4-3ubuntu6.3, ext4 and tmpfs on one host. No-preread is an operation-order condition, not a measured cold cache. Advice is not guaranteed cache eviction. No ENOSPC test, crash test, timing, physical-write measurement or independent-host replication was performed.
Inspect the method and reproduction instructions, original read sequence, all GNU cp observations, complete grouped table and separate syscall witnesses. The artifact manifest identifies the immutable evidence commit and file hashes.
Skipping zeros is not replacing old bytes
A sparse update needs a destination-content precondition. GNU dd with conv=sparse,notrunc can leave prior nonzero bytes where the input contains zeros. This is documented and tested upstream, not a new implementation bug. A successful seek moves the output offset; it does not erase the existing range or perform hole punching. [GNU manual] [Upstream control] [2]
Our input was 16,384 bytes: 4,096 bytes of A, 4,096 zeros, 4,096 bytes of B, then 4,096 zeros. Existing targets contained X throughout the replacement range. A separate all-zero input tests whether a larger transfer block is a general remedy. Offset controls put the target between 4,096-byte P and S guards. Each of 12 configurations ran twice on the same host. Every invocation returned zero with empty standard error; exact byte comparison, not exit status or file length, determined whether the intended copy was obtained.
| Initial target / copy policy | Block bytes | Output bytes | Differing bytes |
|---|---|---|---|
| Absent / sparse | 4,096 | 16,384 | 0 |
| Stale / truncate + sparse | 4,096 | 16,384 | 0 |
| Stale / sparse + notrunc, 512 | 512 | 16,384 | 8,192 |
| Stale / sparse + notrunc, 4096 | 4,096 | 16,384 | 8,192 |
| Stale / sparse + notrunc, 8192 | 8,192 | 16,384 | 0 |
| Stale / sparse + notrunc, 16384 | 16,384 | 16,384 | 0 |
| Stale / notrunc, no sparse | 4,096 | 16,384 | 0 |
| Known zeros / sparse + notrunc | 4,096 | 16,384 | 0 |
| Stale / sparse + notrunc + fsync | 4,096 | 16,384 | 8,192 |
| Stale / all-zero input, sparse + notrunc | 16,384 | 16,384 | 16,384 |
| Guarded offset / sparse + notrunc | 4,096 | 24,576 | 8,192 |
| Guarded offset / notrunc, no sparse | 4,096 | 24,576 | 0 |
At 512 or 4,096 bytes per block, sparse/notrunc left 8,192 stale bytes in the mixed input's target. At 8,192 or 16,384, each output block included nonzero data and was written in full. A larger block is not a general fix: the all-zero 16,384-byte control left every target byte stale. The offset pair preserved both surrounding guards in both modes, but only the ordinary notrunc copy replaced the complete target. Fresh, truncated and known-zero targets were additional controls.
Input delivery can change the grouping
With GNU dd bs= and no data-transforming conversion, a short input read is passed to output without first filling the requested block. Linux read can return fewer bytes than requested, including on pipes. iflag=fullblock accumulates input reads; it does not zero an existing destination. Source-based implication: the larger-block regular-file controls above do not predict a pipe-fed copy from bs= alone. A different grouping can expose an all-zero chunk to the sparse-output path. No pipe-fed run was performed in this experiment. [GNU bs/fullblock] [read(2)]
Synchronization cannot supply an omitted write
The retained sparse/notrunc/fsync trace contains two 4,096-byte writes and two 4,096-byte seeks, followed by a successful fsync. Readback still found the stale regions. The pinned upstream iwrite path explains why: a successful zero-block seek is counted as processed output without that write. This is a completed-operation observation, not a crash-survival test. [GNU dd implementation]
Research context: Pillai and colleagues' OSDI 2014 ALICE study requires an application workload and a checker for its intended invariants, including expected recovery steps. Its exploration is incomplete and depends on those workloads and checkers. Our narrower methodological inference is to validate the requested copy, not merely command completion. We did not run ALICE: the byte mismatch here exists before any crash, so it is not one of that paper's persistence vulnerabilities. [Sections 3.1, 3.6 and 4.1]
For a new image, exclusive creation can prevent accidental reuse of an existing destination. For an in-place update, establish that every skipped range already reads as the required zeros, or use a procedure that actually replaces them. Exclude concurrent writers or coordinate access so that this precondition remains true throughout the update; a prior zero check is not a reservation of those contents. This is an operational inference, not a concurrency experiment. Do not remove notrunc blindly: truncation can discard data outside the intended update. Verify the target bytes, expected length and required surrounding data. Neither sparse seeking nor a matching byte comparison establishes physical-media sanitization.
Scope: synthetic regular files on one ext4 host, Linux 6.8.0-146-generic, GNU coreutils package 9.4-3ubuntu6.3 and strace 6.8. The captures retain stat's coarser ext2/ext3 label. These selected counterexamples are not a failure-rate sample or independent-host replication. No raw device, crash, throughput or physical-write experiment was run. The distribution binary is fingerprinted separately from the upstream source.
Reproduce with the method and code guide; inspect all twelve generated results, the first native capture, its repeat and the file hash inventory. No new data is inferred from equal hashes alone: the captures also record mismatched byte ranges and the exact commands.
Allocated does not mean private: reflink and CoW
A reflink gives distinct files shared backing storage. A write to either file must remain private to that file, so a later overwrite can need new allocation even though the original range already had blocks. Linux FICLONE operates within one filesystem; it does not create an independent backup. [9]
FALLOC_FL_UNSHARE_RANGE addresses this sharing boundary by making shared extents private before later writes. Support depends on the filesystem. Do not silently replace an unsupported request with a different operation and assume the same guarantee. Unsharing is still a filesystem operation, not a reservation in every underlying pool. [1]
Research context: measure the work after cloning
Zhan and colleagues' How to Copy Files (FAST 2020, Section 5.1) tests clone creation, later writes, reads and space use separately. Its Dookubench starts with 64 files of 4 MiB, makes clones, changes 16 bytes per file, synchronizes, then clears caches before reading. This exposes work that a clone-creation timer alone misses. [10]
The authors propose copy-on-abundant-write in BetrFS: batch modifications before breaking sharing, balancing copying cost with locality. The evaluation used a 500 GB 7200 RPM SATA disk and different kernels for BetrFS and the comparison filesystems. It reports at least five runs unless stated otherwise; timing bars show observed minima and maxima, not confidence intervals. These are historical experimental results, not a ranking of current SSD filesystems or a pool-capacity guarantee. [10]
A subtle cost appears in the background cleaner. In the BetrFS 0.5 prototype, flushing small buffered updates for frequently queried data could break sharing and increase space consumption. The authors changed this read-oriented cleaner to avoid flushing into nodes whose reference count exceeded one. This was not a ban on all unsharing: node splits, merges and space reclamation could still require private copies. The evaluation also compared cleaner-enabled and cleaner-disabled runs because background work added noise to space measurements. Distinguish the cleaner's policy from the complete allocation lifecycle. [Sections 3.3, 4 and 5.1]
Engineering implication: evaluate the complete clone, modify, read and reclaim lifecycle. For backup independence, separately assess the recovery and failure boundary. Hesela has not reproduced the BetrFS experiments.
Data exhaustion is not metadata exhaustion
A thin pool has separate data and mapping metadata. Linux v6.12 documentation groups metadata exhaustion with failed metadata operations, but its implementation distinguishes them. check_for_metadata_space() enters PM_OUT_OF_METADATA_SPACE; metadata growth can restore write mode when needs_check is absent. A failed metadata operation instead attempts to abort the transaction and set that repair flag; failure of these steps can force PM_FAIL. The two metadata states can appear as ro in status. Neither a percentage nor ro alone identifies the recovery path. [6] [17]
Monitor both LVM Data% and Meta%. Automatic extension still depends on monitoring, free volume-group capacity and enough time to react. A configured threshold is not proof that extension can succeed. [5]
Queued does not mean completed
For data-space exhaustion, error_if_no_space fails requests that cannot be serviced; queue mode holds them for possible recovery. In v6.12, the pool-level no_space_timeout defaults to 60 seconds; zero disables this timeout. It is not a fresh deadline for every request or an application latency guarantee. On expiry, do_no_space_timeout() switches the pool to error mode and fails its retry list with BLK_STS_NOSPC. This block status is not a universal promise of the application's final errno. [6] [17]
The queue policy does not apply to unserviceable requests in the metadata-space, read-only or fail states: the source returns BLK_STS_IOERR there. In data-space exhaustion, existing unshared mappings can still service overwrites without new allocation; shared mappings can need copy-on-write. This is not a claim that I/O remains available in PM_FAIL. [17]
A configuration backup is not a mapping backup
LVM has more than one kind of metadata. vgcfgbackup saves VG configuration, not LV contents; it also does not save thin-pool mappings. Restoring that text file cannot undo removal of a thin LV. [18] [5] The vgcfgrestore manual warns that a restored configuration that no longer matches the pool's metadata can cause data loss. Its force option is not a consistency check or an undo mechanism. [19]
A metadata inspection snapshot is different again. Linux's reserve_metadata_snap holds a mapping-tree view for userspace; it is not the create_snap operation that creates a thin-volume snapshot. [6] The versioned thin_dump manual requires its metadata-snapshot mode for live metadata and distinguishes restorable XML from human-readable output. [20] Scope: an exported mapping description is not a copy of the corresponding data blocks or proof of application recoverability.
The pool may not contain every readable byte
A dm-thin volume can use an external origin: reads from unprovisioned regions within the origin are served by that separate device. Keep the origin unchanged and read-only; descendant snapshots require the same origin parameter. This is an optional configuration, not a property of every thin volume. [6]
Recovery inference: copying pool data and mappings alone is insufficient while readable regions still depend on the external origin. A matching device name is not content-identity verification. Retain the base-image dependency when documenting recovery. Thin-pool definition.
Linux v6.12 also distinguishes write coverage. For a newly provisioned logical block wholly within the origin's address range, a partial overwrite first copies the existing block into the pool; one write BIO covering the whole pool block can bypass that copy. This follows schedule_external_copy and schedule_copy, not a measured physical-I/O count or a rule for a shorter origin's boundary. No native pool experiment was performed here. [17]
Collect evidence before choosing a response
- Record
Data%,Meta%,whenfull, monitoring, free VG extents and pool status together. Queue/error policy and autoextension are independent. [5] - Preserve logs and
needs_check. An aborted metadata transaction may require checking upper-layer consistency after pool repair; increasing capacity is not a substitute for that check. [6] - Treat
_pmspareas a destination for repaired metadata, not liveMeta%headroom or an up-to-date backup. [5]
Disabling the timeout does not create capacity: LVM warns of blocked tasks, memory exhaustion and possible deadlock. This is a versioned source review, not a pool-exhaustion experiment or a repair recipe. [5]
- Identify the filesystem, backing volume, pool and relevant snapshots.
- Record logical size, filesystem allocation, data usage and metadata usage separately.
- Check the actual allocation mode, discard policy and supported operations.
- Verify growth headroom and error handling before capacity pressure becomes an incident.
This checklist is editorial synthesis. It is not a command sequence for modifying or repairing a live pool.
Method and limits
Primary-source review of Linux man-pages, util-linux 2.41.2, LVM2, Linux 6.12 dm-thin, ext4 and FIEMAP documentation, plus Zhan et al., FAST 2020 Sections 1, 4 and 5.1; layer-boundary conclusions are identified as editorial inferences. Allocation API supplement: Linux man-pages and glibc 2.40 source review; a separate invalid-descriptor C check tests return conventions only. Original observation: three fresh 1 MiB files on one ext4 host, four native allocation stages, checked fsync, complete zero-byte readback, fstat and FIEMAP with request flags zero; public code and exact environment accompany the generated results. FIEMAP supplement: nine fresh files in three repeated arms compare a flags-zero control, explicit fsync and FIEMAP_FLAG_SYNC; fstat brackets each query and full patterned readback follows. Linux v6.8 ext4 source and 2007 LSF workshop slides supply implementation and historical context. Thin-pool supplement: source review of Linux v6.12 drivers/md/dm-thin.c state transitions, queue timeout and metadata resize, cross-checked against LVM2 documentation; no live pool was modified. Recovery supplement: LVM2 vgcfgbackup/vgcfgrestore and thin-provisioning-tools 0.9.0 documentation distinguish configuration, mapping inspection and payload backup; no restore was executed. Sparse-copy supplement: 40 read-sequence fixtures plus 336 GNU cp copies (seven layouts, two filesystems, four option combinations, two preread conditions, three repeats), with byte oracles, file allocation, seek maps, logical FIEMAP descriptors and four separate syscall witnesses. The publication summary is generated from immutable observations; upstream Linux v6.8 and GNU coreutils v9.4 supply scoped implementation explanations. Quota supplement: Linux man-pages and kernel quota documentation, XFS administration manual and Linux v6.8 XFS source distinguish availability counters, enforcement and project-scoped statistics. Historical reservation-policy context: Edwards et al., USENIX ATC 2008, Section 4.3; not a current product configuration guide. Capacity-accounting supplement: SNIA dictionary definitions and version-scoped NetApp reporting guidance, with tested hypothetical arithmetic that separates current effective capacity from a constant-ratio extrapolation. Reduction-population supplement: Dell PowerStore reporting definitions and a tested ratio-of-sums illustration for non-overlapping physical footprints; arithmetic and planning inferences are not empirical findings. Unit supplement: IEC and NIST prefix definitions with executable integer-byte conversions and a hypothetical fixed overhead deduction; no new device measurement. Volume-size supplement: LVM2 and e2fsprogs manuals distinguish block-device resizing from filesystem resizing; no volume or filesystem resize was executed. PV/VG supplement: LVM2 pvcreate, vgextend and lvcreate document allocation layers and special pool LV types; this is a source review, not a capacity or resize experiment. Metadata-sizing clarification follows the Linux dm-thin guide: its arithmetic is not a workload-independent reservation guarantee. Allocation-eligibility clarification: lvm(8) separates a free-extent total from placement allowed by the requested policy. FAT32 supplement: seven designed FSInfo inputs under two FatFs R0.16 policies, repeated with optimized and UBSan builds on ordinary 64 MiB images; independent FAT, directory and payload checks. A fresh same-host replay reproduced the fourteen input-policy pairs. Microsoft FAT v1.03, FatFs and Linux v6.12 documentation supply policy context. Seltzer et al. (USENIX ATC 2000), sections 6-8, supply a separate historical recovery comparison; no paper benchmark was reproduced. GNU dd supplement: twelve generated regular-file configurations, two retained runs on one GNU dd 9.4 host, exact complete-destination byte oracles and selected syscall traces; pinned upstream manual, code and regression tests explain known sparse/notrunc semantics. ALICE's workload-checker methodology (Pillai et al., OSDI 2014, sections 3.1, 3.6 and 4.1) supplies comparison, not replication. FAT name-association supplement: source review and a generated summary of 80 constructed FAT12/FAT16 cases read by GNU mtools 4.0.49, with two byte-identical captures. Linux v6.12 parser ordering is a source-only contrast. A pinned Zephyr-maintained FatFs R0.16 patch-2 reader additionally replayed the same 80 images in optimized and UBSan builds; the cross-reader summary is generated from the frozen capture. Prabhakaran et al., IRON File Systems (SOSP 2005), section 4, supplies methodological context for structure- and operation-specific fault response, not validation or replication of the FAT observations. LVM relocation supplement: LVM2 v2_03_35 manual, option definitions and selection tests, current pvmove manual and RHEL 10 documentation; source review only, with no volume migration or fault injection. Metadata-limit correction: source-derived integer arithmetic from Linux v6.12 dm-thin and persistent-data headers separates the allocation-map cap and warning threshold; no pool was created, exhausted or resized. Bit/byte supplement: NIST unit definitions, RFC 5234 octets, RFC 3629 UTF-8 and the C11 N1570 draft; standard-encoder examples and unit arithmetic, not new device measurements. Deduplication sampling supplement: Harnik et al., FAST 2016, sections 2.2 and 3.1-3.4, and Valiant and Valiant, NeurIPS 2013, definition 1 and section 2; exact finite enumeration from the published Hesela corpus, not an execution of Unseen or a fleet measurement. Seek-contract supplement: reviewed Linux v6.8 generic/iomap/ext4 sources and Linux man-pages, plus four newly prepared private regular files with endpoint queries, duplicated and separately opened descriptors, and complete byte-oracle readback. Windows validity supplement: Microsoft Win32, driver and MS-FSCC documentation distinguish file-size changes from validity advancement; source review only. Device-mapper tutorial supplement: twelve designed native Perl 5.38.2 arithmetic cases and an independent integer oracle, source-hash checked and exactly replayed; no device commands. BORG (FAST 2009), sections 4.4, 5.1-5.3 and 6, provides a separate historical map/movement comparison. Zero/error-target supplement: pinned Linux v6.12 documentation and mapping/flush source review; no device execution.
The controlled file observation is not a device or pool-exhaustion experiment and measures no timings. Filesystem support, discard policy, snapshots and deployment versions affect behavior; no universal physical-capacity guarantee is inferred. The separate invalid-descriptor check does not exercise successful allocation, emulation or concurrent writers. Background writeback can race with each FIEMAP query; sequential stat and mapping calls are not atomic, and equivalent mapping results do not establish equivalent durability contracts. The cp result covers one Ubuntu 6.8.0-146-generic host and package 9.4-3ubuntu6.3; source preread is not a cache-residency measurement. No later ENOSPC, hardware traffic, other cp release, network filesystem or independent-host replication was tested. The quota supplement is a source review; no quota, reserved-block setting or live pool was changed, and no quota-exhaustion experiment was performed. The capacity example is an accounting illustration, not an array observation; future reduction, metadata and operational headroom can invalidate the extrapolation. The FatFs supplement does not exercise physical media, the Linux FAT driver, power-loss recovery or concurrent writers, and supplies no timing or population estimate. It demonstrates documented partial-write behavior under deliberately stale counters, not a new vulnerability. The dd cases are purposive controls, not a failure-rate sample. No raw-device access, physical overwrite, crash survival or latest-version behavior is established; a successful fsync is not evidence that intentionally skipped writes occurred. The long-name experiment does not cover FAT32, exFAT, Unicode edge cases or mounted Linux; first-cluster reassignment deliberately creates a cross-link and does not establish a naturally occurring failure rate. Sampling counterexamples use fixed-size position subsets and equal-sized chunks; they do not establish behavior of the paper's approximate-fraction hash sampler, universal sample requirements or calibrated confidence ranges. The seek-contract observation has no concurrent writers and is not an allocation census, crash experiment or independent-host replication. The no-snapshot warning is a source-based inference. No Windows API execution or performance claim is made; conflicting Win32 equality and network-support language is not resolved by extrapolating a protocol information class. The reversal observation concerns the pinned Linux v6.12 documentation example, not a kernel-driver defect, empty-table acceptance, huge integer boundaries, hardware behavior or a BORG reproduction. This is not a device experiment, capacity benchmark or claim of end-to-end space savings. The pinned Linux and util-linux releases are reference versions, not assertions about the newest software. Recheck the implementation used by your filesystem and storage stack.
Machine-readable companion definitions: sparse file, hole punching, file preallocation and thin provisioning.
Primary sources
- Linux man-pages: fallocate(2), allocation and mode contracts
- Linux man-pages: lseek(2), holes and SEEK_DATA/SEEK_HOLE
- Linux man-pages: inode(7), file size and allocated blocks
- util-linux 2.41.2: fallocate(1), preallocation, punching and zeroing
- LVM2: lvmthin(7), physical allocation, discards and pool exhaustion
- Linux 6.12: device-mapper thin provisioning, metadata and exhaustion
- Linux 6.12: ext4 extent tree and mapping format
- Linux 6.12: FIEMAP extent states and access restrictions
- Linux man-pages: FICLONE and FICLONERANGE sharing semantics
- Zhan et al. (2020), How to Copy Files, FAST 20, pp. 75-89; Sections 3.3, 4 and 5.1
- Linux man-pages: posix_fallocate(3), return convention and glibc caveats
- glibc 2.40: Linux posix_fallocate dispatch to emulation on EOPNOTSUPP
- glibc 2.40: generic posix_fallocate read/write emulation
- Linux v6.8 source: ext4_file_getattr includes delayed-allocation reservations
- Cao, Bhattacharya and Ts'o (2007), Ext4: The Next Generation of Ext2/3 Filesystem, LSF workshop slides, slide 22
- Linux v6.8 fs/ioctl.c: FIEMAP_FLAG_SYNC uses filemap_write_and_wait, not fsync
- Linux v6.12: dm-thin.c, pool modes, timeout, failed metadata operations and resize
- LVM2 vgcfgbackup(8): volume-group configuration backup excludes LV contents
- LVM2 vgcfgrestore(8): thin-metadata mismatch and restore warning
- thin-provisioning-tools 0.9.0: thin_dump(8), live-metadata restrictions and output formats
- Linux v6.8 ext4_llseek delegation
- Linux v6.8 iomap seek handling of unwritten extents
- Linux v6.8 page-cache seek classification
- GNU coreutils v9.4 copy.c: sparse heuristic and copy paths
- GNU coreutils v9.4 manual: sparse-copy policies
- Linux man-pages: statvfs(3), block units and availability counters
- Linux man-pages: quotactl(2), user, group and project limits
- Linux kernel: quota subsystem, space/inode limits and grace periods
- Linux man-pages: write(2), EDQUOT, ENOSPC and partial writes
- XFS: xfs_quota(8), accounting versus enforcement
- Linux v6.8: XFS statfs project-scope selection
- Linux v6.8: XFS quota-adjusted filesystem counters
- Edwards et al., USENIX ATC 2008: FlexVol reservation policies (Section 4.3)
- SNIA Dictionary: raw capacity
- SNIA Dictionary: addressable capacity
- SNIA Dictionary: formatted capacity
- NetApp ONTAP: capacity reporting and measurements
- NetApp HCI 1.9: dashboard capacity and thin-provisioning efficiency
- SNIA Dictionary: effective capacity
- Dell PowerStore Monitoring: overall and reducible data-reduction ratios
- Harnik, Khaitzin and Sotnikov, FAST 2016: Estimating Unseen Deduplication, sections 2.1, 3.1-3.4 and 4.1
- Zhu, Li and Patterson. Avoiding the Disk Bottleneck in the Data Domain Deduplication File System. FAST 2008, sections 2.1, 2.2 and 3.1.
- IEC style guide: Units and symbols, decimal and binary byte multiples
- NIST SP 330, Section 3: decimal and binary prefixes
- LVM2 lvm(8): virtual block devices and logical-volume types
- e2fsprogs resize2fs(8): filesystem growth and shrink support
- LVM2 lvreduce(8): filesystem ordering and data-loss warning
- LVM2 pvcreate(8): whole-device or partition PV initialization
- LVM2 vgextend(8): added PVs supply LV-allocation space
- LVM2 lvcreate(8): application-facing volumes and special pool LV types
- Microsoft FAT specification v1.03 (2000): FSInfo sector, pp. 21-22
- FatFs configuration: FF_FS_NOFSINFO
- FatFs f_write: status and written-byte count
- Linux v6.12 VFAT documentation: usefree
- Seltzer et al., Journaling versus Soft Updates: Asynchronous Meta-data Protection in File Systems, USENIX ATC 2000, sections 6-8
- Hesela: FatFs R0.16 FSInfo experiment, original captures and reproduction instructions
- GNU Coreutils v9.4 manual: dd sparse and notrunc
- GNU Coreutils v9.4 sparse-output regression tests
- GNU Coreutils v9.4 dd.c: zero-block seek and trailing-output handling
- Pillai et al., OSDI 2014: All File Systems Are Not Created Equal, sections 3.1, 3.6 and 4.1
- Linux man-pages: read(2), successful short reads and pipes
- Linux v6.12: ext4_statfs reserve accounting and project-quota adjustment
- Linux v6.12: ext4_has_free_clusters credential and internal-reserve checks
- e2fsprogs tune2fs(8): reserved-block count, percentage, user and group
- McKusick et al. (1984), A Fast File System for UNIX: reserve policy and measurement conditions, pp. 187 and 191
- Microsoft FAT specification v1.03 (2000), pp. 27-29 and 33: long-name association and checksum
- Hesela: FAT long-name association, 80 constructed native cases and repeat capture
- Linux v6.12 fs/fat/dir.c: fat_parse_long, lines 273-327
- Hesela: same-image FAT reader comparison, lookup controls and content identity
- Prabhakaran et al., IRON File Systems, SOSP 2005, section 4: failure-policy fingerprinting
- Ubuntu: CVE-2026-118384, historical mtools parser safety
- LVM2 pvmove(8): extent selection, checkpoints, abort and background completion
- LVM2 v2_03_35: pvmove temporary mirrors and placement checkpoints
- LVM2 v2_03_35: abort and atomic option contracts
- LVM2 v2_03_35: ordinary and atomic pvmove range-selection tests
- Red Hat Enterprise Linux 10: LVM architecture and online data relocation
- Teigland and Mauelshagen, Volume Managers in Linux, USENIX ATC FREENIX 2001, sections 3 and 3.1.3
- Linux v6.12 dm-thin-metadata.h: metadata-map cap alias and separate 16 GiB warning threshold
- Linux v6.12 dm-space-map-metadata.h: 255 index entries, bitmap geometry and 4096-byte metadata blocks
- Linux man-pages: stat(2), pathname, link and descriptor observations
- Linux kernel documentation: Tmpfs, virtual memory and unmount lifetime
- Linux man-pages: fsync(2), file and directory synchronization
- Linux man-pages: fifo(7), pathname and open semantics
- Linux man-pages: pipe(7), capacity, atomic writes and endpoint lifetime
- Linux man-pages: F_GETPIPE_SZ(2const), nominal capacity and usable buffer space
- Ritchie and Thompson: The UNIX Time-Sharing System, BSTJ 57(6), 1978, sections 5.2 and 6.2
- POSIX.1-2017: fgetc(), stream state and return values
- POSIX.1-2017: clearerr(), stream state and return values
- POSIX.1-2017: fseek(), stream state and return values
- NIST: Prefixes for binary multiples, unit examples
- WG14 N1570, C11 committee draft: sections 3.5-3.6, 5.2.4.2.1 and 6.5.3.4
- RFC 5234: Appendix B.1, OCTET core rule
- RFC 3629: section 3, UTF-8 definition
- C. E. Shannon, A Mathematical Theory of Communication (1948): sections 6-7, corrected reprint
- OpenZFS 2.3 zfsprops(7): compressratio, refcompressratio and logicalused
- Broadcom KB 315553: vSAN ESA 9.1 space-efficiency counter populations
- Meister, Brinkmann and Suss, File Recipe Compression in Data Deduplication Systems, FAST 2013, sections 1-3
- Gregory Valiant and Paul Valiant, Estimating the Unseen, NeurIPS 2013: definition 1 and section 2
- Hesela: exact deduplication sample identifiability and grouped-read controls, code and JSON evidence
- Linux v6.8: generic_file_llseek_size, exact EOF input and conservative classification
- Linux man-pages: dup(2), shared file offset
- Linux man-pages: pread(2), explicit position and short reads
- Linux man-pages: open(2), new open file descriptions
- Hesela: four-file seek endpoint and shared-cursor observation, source and tests
- Microsoft Learn: SetFileValidData, privilege requirements and stale-content disclosure
- Microsoft Learn: SetEndOfFile, file size versus valid data length
- Microsoft Learn: FSRTL_COMMON_FCB_HEADER, separate stream length fields
- Microsoft MS-FSCC 2.4.50: FileValidDataLengthInformation, bounds and errors
- Stender et al. (2008): Striping without Sacrifices, sections 2-4
- Linux kernel: dm-linear range translation
- LVM2 dmsetup(8): table format and 512-byte sector units
- Linux v6.10 stable ABI: logical_block_size and physical_block_size
- Linux v6.12: dm-linear reversal example at commit adc218676eef25575469234709c2d87185ca223a
- Bhadkamkar et al. (FAST 2009): BORG, sections 4.4, 5.1-5.3 and 6
- Linux v6.12: zero target and snapshot-backed sparse devices
- Linux v6.12: dm-zero ordinary reads, readahead, writes and discard
- Linux v6.12: error target mapping callbacks and optional device limits
- Linux v6.12: bio error completion and empty-flush target selection
- Linux v6.12: snapshot COW storage, chunks and exhaustion
LVM relocation sources checked 9 November 2026; FAT long-name sources checked 7 November 2026; FAT32 sources and historical recovery comparison checked 25 October 2026; volume hierarchy and resize sources rechecked 24 October 2026; unit-prefix sources checked 23 October 2026; capacity-accounting sources checked 22 October 2026; reduction-population supplement checked 23 October 2026; quota and reservation sources checked 21 October 2026; sparse-copy evidence checked 20 October 2026; thin-pool implementation and size limits checked 31 October 2026; external-origin routing and copy scope checked 1 November 2026. Earlier source checks remain in the metadata.