coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] copy: adjust fiemap handling of sparse files


From: Pádraig Brady
Subject: Re: [PATCH] copy: adjust fiemap handling of sparse files
Date: Wed, 16 Mar 2011 15:26:40 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

On 14/02/11 06:05, Jim Meyering wrote:
> Pádraig Brady wrote:
>> For my own reference, I can probably skip performance
>> tests on (older) btrfs by checking `filefrag` output.
>> Also in `cp`, if we see an "unwritten extent" we should
>> probably create a hole rather than an empty allocation
>> by default.  It's better to decrease file allocation
>> than increase it.
> 
> Makes sense.

Thinking a bit more about it, I'm not sure I should do the above,
as one would be more surprised if cp by default introduced holes into
a copy of a fully allocated file.

The previously applied patch changes behavior on BTRFS on Fedora 14,
in that it will convert a file with holes to a fully allocated one
with zeros. But that is due to an already fixed bug in BTRFS
where it reports holes as empty extents.

I'm inclined to leave this as is, because this stuff is tricky enough,
without introducing work arounds for buggy file systems.
There is no data loss in this case, just bigger files
(which one can avoid with cp --sparse=always).
Also it will not be common to overlap future coreutils releases,
with older BTRFS implementations.

cheers,
Pádraig.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]