From owner-cvs-all@FreeBSD.ORG Tue Dec 18 12:53:54 2007 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1E8F16A419; Tue, 18 Dec 2007 12:53:54 +0000 (UTC) (envelope-from dds@aueb.gr) Received: from blue.servers.aueb.gr (blue.servers.aueb.gr [195.251.255.132]) by mx1.freebsd.org (Postfix) with ESMTP id 797F513C45D; Tue, 18 Dec 2007 12:53:54 +0000 (UTC) (envelope-from dds@aueb.gr) Received: from [195.251.254.141] ([::ffff:195.251.254.141]) by blue.servers.aueb.gr with esmtp; Tue, 18 Dec 2007 14:45:07 +0200 id 000D11A7.4767C0D3.00001FEB Message-ID: <4767C065.2040304@aueb.gr> Date: Tue, 18 Dec 2007 14:43:17 +0200 From: Diomidis Spinellis User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070509 SeaMonkey/1.1.2 MIME-Version: 1.0 To: Alfred Perlstein References: <200712180849.lBI8nmEi088947@repoman.freebsd.org> <20071218100355.GR16982@elvis.mu.org> In-Reply-To: <20071218100355.GR16982@elvis.mu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: cvs-src@FreeBSD.ORG, Bruce Evans , src-committers@FreeBSD.ORG, Diomidis Spinellis , cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/tools/regression/bin/mv regress.sh X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2007 12:53:54 -0000 Alfred Perlstein wrote: > Does 'mv' spawn off tar or something to do the copy part? > > You can _usually_ get much better cross device performance > by hooking two processes together like so: > > tar -cf - -C /path/to/source . | tar -xf - -C /path/to/dst > > This will keep the disks a lot busier, but this can make > things worse on cross device moves that happen to be > on the same disk. > This is an interesting idea. Currently, mv spawns off cp and rm when rename fails with EXDEV. Given that our cp often uses mmap to avoid the read/write context switching, I'm not sure that using a tar pipe will buy us a lot of performance. Anyway, the major problem is now the semantics of POSIX for cross-device links. The regression tests I wrote succeed in all rename(2)-based tests. Running *the same tests* across devices on FreeBSD, Solaris, and Linux gives us three different sets of failed tests. Also, a literal reading of POSIX seems to require mv to loose some data or leave data lying around when some parts of the cp/rm dance fail. As bde@ pointed out in a private email, my initial implementation was intepreting POSIX too liberaly in this respect, trying to avoid data loss, so this also probably needs changing. I'm discussing these aspects with bde@ off-list. If anybody else wants to to be cc'd, drop me a line. Diomidis