From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 2 20:59:41 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 C441816A4DF for ; Wed, 2 Aug 2006 20:59:41 +0000 (UTC) (envelope-from prvs=julian=362ec947a@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 725D743D4C for ; Wed, 2 Aug 2006 20:59:41 +0000 (GMT) (envelope-from prvs=julian=362ec947a@elischer.org) Received: from unknown (HELO [10.251.18.229]) ([10.251.18.229]) by a50.ironport.com with ESMTP; 02 Aug 2006 13:59:41 -0700 Message-ID: <44D1123C.6080601@elischer.org> Date: Wed, 02 Aug 2006 13:59:40 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.13) Gecko/20060414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <200608021746.k72HkIRO004011@lurza.secnetix.de> In-Reply-To: <200608021746.k72HkIRO004011@lurza.secnetix.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 20:59:41 -0000 Oliver Fromme wrote: >Bakul Shah wrote: > > Peter Jeremy wrote: > > > 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. > > > > Except for database tables how common is this? > >For example image files of media, e.g. ISO9660 images >or images of hard disk partitions. I often have to handle >such images, and I certainly do _not_ want them to be >sparse. > > well then you'd be silly to go to the extra work fo specifying --sparse (or whatever) wouldn't you? >Before someone adds a bogus "sparse file support" option >to cp(1), I would rather prefer that someone fixes the >existing -R option which currently doesn't handle hard- >links correctly. > > It never worked as you suppose. Changing it would be a surprise (though to me a pleasant one) to many. >That flaw is documented in the manual page, so it might >not count as a "bug", but it's a flaw nevertheless. A lot >of people -- even so-called professional admins -- use >"cp -Rp" to copy directory hierarchies, and afterwards >they wonder why the copy takes up much more space than >the original, because all hardlinks have been copied as >separate files (if they notice at all). > > I ALWAYS use find . -depth -print0|cpio -pdmuv0 {dest} or -pdlmuv (poodle-move-0?) if I want links from old to new. because it is guaranteed to do that but cp is not. >Oh by the way: Linux' option for sparse file handling >is "--sparse", and there is no one-letter option (both >-s and -S exist, but have nothing to do with sparse >files). So there wouldn't be an easy way for FreeBSD to >stay compatible with Linux. > >Best regards > Oliver > > >