From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 2 07:33:47 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C90FC16A4DA; Wed, 2 Aug 2006 07:33:47 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id B571743D5A; Wed, 2 Aug 2006 07:33:43 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail08.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k727XeZl000582 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 2 Aug 2006 17:33:41 +1000 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.6/8.13.6) with ESMTP id k727XegJ000909; Wed, 2 Aug 2006 17:33:40 +1000 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.6/8.13.6/Submit) id k727Xewp000908; Wed, 2 Aug 2006 17:33:40 +1000 (EST) (envelope-from peter) Date: Wed, 2 Aug 2006 17:33:40 +1000 From: Peter Jeremy To: Tim Kientzle Message-ID: <20060802073340.GA713@turion.vk2pj.dyndns.org> References: <44CE199C.2020500@centtech.com> <17614.8289.134373.387558@bhuda.mired.org> <96b30c400607310847s1d2f845eo212b234d03f51e9a@mail.gmail.com> <17614.10982.499561.139268@bhuda.mired.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> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BXVAT5kNtrzKuDFl" Content-Disposition: inline In-Reply-To: <44D04797.1040201@freebsd.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: [PATCH] adding two new options to 'cp' X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2006 07:33:47 -0000 --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--