From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHAo5-00021q-Ib for qemu-devel@nongnu.org; Tue, 12 Aug 2014 08:04:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHAo3-0007dS-7k for qemu-devel@nongnu.org; Tue, 12 Aug 2014 08:04:01 -0400 Received: from mail-ig0-x235.google.com ([2607:f8b0:4001:c05::235]:35367) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHAo3-0007dA-2n for qemu-devel@nongnu.org; Tue, 12 Aug 2014 08:03:59 -0400 Received: by mail-ig0-f181.google.com with SMTP id h3so6421869igd.14 for ; Tue, 12 Aug 2014 05:03:58 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20140812113916.GB2803@T430.redhat.com> References: <20140812005214.GB6226@T430.nay.redhat.com> <20140812111919.GA2803@T430.redhat.com> <20140812113916.GB2803@T430.redhat.com> From: =?UTF-8?B?5ZC05YW05Y2a?= Date: Tue, 12 Aug 2014 08:03:18 -0400 Message-ID: Content-Type: multipart/alternative; boundary=047d7b1118fd6bf08f05006d771f 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: Fam Zheng , qemu-devel@nongnu.org --047d7b1118fd6bf08f05006d771f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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. They just have no way to make it right. The real reason of it would be that filesystems have different allocation unit size. 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 entire 16KB filled with data, to be specific, the hole is filled with zero and cp/rsync have NO way to make difference. 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. Is that correct? I really appreciate. Cheers! =E5=90=B4=E5=85=B4=E5=8D=9A Wu, Xingbo On Tue, Aug 12, 2014 at 7:39 AM, Fam Zheng wrote: > On Tue, 08/12 07:22, =E5=90=B4=E5=85=B4=E5=8D=9A wrote: > > Thanks, I get it. > > Does rsync have exactly the same problem? > > Yes. > > Fam > --047d7b1118fd6bf08f05006d771f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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 wou= ld not come from cp or rsync -- It's not their fault. They just have no= way to make it right.
The real reason of it would be that filesystems have different allocat= ion unit size.

For example, a file is of 16KB in a= ppearance, and the 4KB-12KB of it is a hole (0KB-4KB and 12KB-16KB has vali= d data).
The FS held it has 4KB block size, so it *could* be allocated like thi= s.
Copying this file to a filesystem of 16KB block size would cau= se the entire 16KB filled with data, to be specific, the hole is filled wit= h zero and cp/rsync have NO way to make difference.

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.

Is that correct?
I reall= y appreciate.

Cheers!
=C2=A0 =C2=A0 =C2=A0 =C2=A0=E5=90=B4=E5=85=B4=E5=8D=9A =C2=A0W= u, Xingbo <wuxb45@= gmail.com>


On Tue, Aug 12, 2014 at 7:39 AM, Fam Zhe= ng <famz@redhat.com> wrote:
On Tue, 08/12 07:22, =E5=90=B4=E5=85=B4=E5=8D=9A wrote:
> Thanks, I get it.
> Does rsync have exactly the same problem?

Yes.

Fam

--047d7b1118fd6bf08f05006d771f--