Re: Ext2fs and hashed table.

Matti Aarnio (matti.aarnio@tele.fi)
Thu, 5 Jun 1997 01:51:58 +0300 (EET DST)


Quoting <jwalther@citytel.net>:
> On Wed, 4 Jun 1997, Stephen C. Tweedie wrote:
> > The trouble is that you have to do it for _every_ write request in the
> > hole, unless you do fancy things with the tree and have a sparse map
> > --- in which case you're losing a lot of the intended efficiency gain
> > anyway. The direct map table seems to be a better idea all round for
> > writing into holes.
>
> Whats so important about holes anyways? No other FS has them.

Oh dear, newcomer ? (no offence)

I used to think that no filesystem aside of UNIX UFS,
and variants had hole capabilities in them, but latter
I have learned that there are ways to make files with
holes also in VMS, and even Apple DOS (at Apple-II !)
was able to do files with 'holes'.

UNIX has a lot of places where we use sparse files.
Sparse in sense of containing (apparently) huge spans
of zero blocks. In fact those blocks do not need to
be written to the disk at all, although some usages
for the produced files may want even zero filled blocks
to be there... (recalling SunOS boot loader behaviour..)

You may have seen core files with sizes of several hundred
megabyte -- if you believe what the 'ls -l' tells you,
but the actual disk space usage may still have been just
few tens of kilobytes. This difference is just because
the file contained memory image of all pages that were
writable by the process, and those were a few pages of
DATA/BSS segments (in a.out terms), plus pages of STACK
which was located at somewhere around virtual address 1G/2G,
and growing down... (ELF cores are 'dense', though.)

Yes, sparse files make a lot of sense.

/Matti Aarnio <matti.aarnio@tele.fi>