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!
       吴兴博  Wu, Xingbo <wux...@gmail.com>


On Tue, Aug 12, 2014 at 7:39 AM, Fam Zheng <f...@redhat.com> wrote:

> On Tue, 08/12 07:22, 吴兴博 wrote:
> > Thanks, I get it.
> > Does rsync have exactly the same problem?
>
> Yes.
>
> Fam
>

Reply via email to