On Tue, 2006-Aug-01 23:35:03 -0700, Tim Kientzle wrote:
>The "cheap" solution is to handle it purely on
>extract:  Detect blocks of zeros when restoring
>files and seek over them.

The downside is that you wind up with a sparse file whether or not you
wanted one.

>  I simply dislike
>the GNU tar approach, in part because it requires
>two passes over the file (the map of holes is required
>before the file is written).

Actually, the only real solution to copying sparse files is to add
a system call that can return a map of holes.  This would neatly
address the "needs two passes" problem with tar.

As a general comment (not addressed to Tim):  There _is_ a downside
to sparsifying files.  If you take a sparse file and start filling
in the holes, the net result will be very badly fragmented and hence
have very poor sequential I/O performance.  If you're never going to
update a file then making it sparse makes sense, if you will be
updating it, you will get better performance by making it non-sparse.

-- 
Peter Jeremy

Attachment: pgpQeKoTW1HxK.pgp
Description: PGP signature

Reply via email to