sparse files

Chris Torek chris at mimsy.umd.edu
Sun Dec 3 02:50:28 AEST 1989


In article <235 at dg.dg.com> rec at dg.dg.com (Robert Cousins) writes:
>UNIX treats the "holes" as 0's when read. In fact, UNIX has only
>minimal support for sparse files.  Backing up sparse files often
>involves copying large amounts of nulls.  Once an area of a file is
>written, it cannot be returned to its previous sparse state.

*Real* backup programs (V7 dump and its descendents, but not cpio or
tar) understand holes in files.  It is true, though, that the average
Unix system will fill in a hole if you so much as breathe too loudly
near it.

(Time to argue once again for a change to bmap and rdwri to look to
see if a full block is being written with zero, and if so, to release
the previously allocated block if any....  At the very least `cp' could
look for opportunities to create holes.  Typically this will not slow
things down much, since the first word of each block is rarely zero.)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at cs.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.questions mailing list