Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Aug 2006 17:33:40 +1000
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        Tim Kientzle <kientzle@freebsd.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: [PATCH] adding two new options to 'cp'
Message-ID:  <20060802073340.GA713@turion.vk2pj.dyndns.org>
In-Reply-To: <44D04797.1040201@freebsd.org>
References:  <44CE199C.2020500@centtech.com> <17614.8289.134373.387558@bhuda.mired.org> <96b30c400607310847s1d2f845eo212b234d03f51e9a@mail.gmail.com> <17614.10982.499561.139268@bhuda.mired.org> <ealpn1$lan$1@sea.gmane.org> <20060801072611.GA717@turion.vk2pj.dyndns.org> <20060801171150.GB3413@megan.kiwi-computer.com> <44CF8F1A.5090506@centtech.com> <20060801174048.GE3413@megan.kiwi-computer.com> <44D04797.1040201@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--BXVAT5kNtrzKuDFl
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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.

--=20
Peter Jeremy

--BXVAT5kNtrzKuDFl
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (FreeBSD)

iD8DBQFE0FVU/opHv/APuIcRAiy3AJwNeZ3VgF2T69oKJlImDOw/bkCToACeMCXT
TjXcuJ866a2PuQ6+fbSbaxE=
=p4ti
-----END PGP SIGNATURE-----

--BXVAT5kNtrzKuDFl--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060802073340.GA713>