Skip site navigation (1)Skip section navigation (2)
Date:      30 Apr 1999 00:01:11 +0200
From:      naddy@mips.rhein-neckar.de (Christian Weisgerber)
To:        freebsd-stable@freebsd.org
Subject:   Re: Does tar do sparse files these days
Message-ID:  <7gakr7$ep0$1@mips.rhein-neckar.de>
References:  <7g7vdc$3e6$1@mips.rhein-neckar.de> <199904291758.NAA25146@po1.bbn.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Dennis Rockwell <dennis@bbn.com> wrote:

> You would have to do run-length encoding of all strings of
> nulls above some small threshhold, regardless of their
> alignment, then always seek over these strings when
> retrieving.

Right.

> Since, as you say, the API doesn't reflect these holes, manufacturing
> new holes isn't a problem, and even saves some disk space.

I'm under the impression that holes are a bad idea in a swap file. But
since you need to apply the above heuristic only if stat.st_blocks
suggests holes in the first place, this is likely not a problem. Beware
of making holes unconditionally, though.

> I don't know if the file format would support this, and I
> wouldn't expect something this CPU-expensive to be the
> default behavior.

As I mentioned previously, you can enable this with "-S" for GNU tar.
The POSIX ustar format doesn't support it, so all tar's that offer such
an option implement it by way of some format extension.

-- 
Christian "naddy" Weisgerber                  naddy@mips.rhein-neckar.de
    100+ SF Book Reviews: <URL:http://home.pages.de/~naddy/reviews/>;



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7gakr7$ep0$1>