[TUHS] Unix filesystem semantics history - files with holes

Richard Tobin richard at inf.ed.ac.uk
Fri Apr 12 01:57:48 AEST 2019

> When did the Unix filesystem add the semantics for "files with holes" (large,
> sparse files)?

It was there in the first edition:


The FILE SYSTEM (V) man page includes a last paragraph identical to
that of FILSYS (V) in seventh edition:

  If block b in a file exists, it is not necessary that all blocks
  less than b exist.  A zero block number either in the address words
  of the the i-node or in an indirect block indicates that the
  corresponding block has never been allocated.  Such a missing block
  reads as if it contained all zero words.

The first edition indirect blocks were a bit different though: if the
file was bigger than 8 blocks (4kB), all the blocks in the inode were
(singly) indirect.

-- Richard

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

More information about the TUHS mailing list