From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHB4W-0006ZW-Ga for qemu-devel@nongnu.org; Tue, 12 Aug 2014 08:21:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHB4P-0005nV-Nn for qemu-devel@nongnu.org; Tue, 12 Aug 2014 08:21:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHB4P-0005lp-Ew for qemu-devel@nongnu.org; Tue, 12 Aug 2014 08:20:53 -0400 Date: Tue, 12 Aug 2014 20:21:06 +0800 From: Fam Zheng Message-ID: <20140812122106.GD2803@T430.redhat.com> References: <20140812005214.GB6226@T430.nay.redhat.com> <20140812111919.GA2803@T430.redhat.com> <20140812113916.GB2803@T430.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] disk image: self-organized format or raw file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?B?5ZC05YW05Y2a?= Cc: qemu-devel@nongnu.org On Tue, 08/12 08:03, =E5=90=B4=E5=85=B4=E5=8D=9A wrote: > I carefully read your reply and thought of it carefully. I'm sorry that > when I said "I get it" I actually meant "I believe you" but not "I > understand it". > The problem would not come from cp or rsync -- It's not their fault. Th= ey > just have no way to make it right. > The real reason of it would be that filesystems have different allocati= on > unit size. >=20 > For example, a file is of 16KB in appearance, and the 4KB-12KB of it is= a > hole (0KB-4KB and 12KB-16KB has valid data). > The FS held it has 4KB block size, so it *could* be allocated like this. > Copying this file to a filesystem of 16KB block size would cause the en= tire > 16KB filled with data, to be specific, the hole is filled with zero and > cp/rsync have NO way to make difference. >=20 > That's not a engineering issue of cp/rsync. It's a real issue cause by = the > fact that (most) filesystems have configurable block size. >=20 Correct. It's not an fault of any party, because there is no contract on this part= at all. What you suggested is not a good use case of the file system hole. Fam