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 23:55:56 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

On 16/03/11 19:18, Mike Frysinger wrote:
> On Wednesday, March 16, 2011 11:26:40 Pádraig Brady wrote:
>> 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.
> 
> well, in the bug report i was working with, we were seeing data loss.  i 
> wonder if it'd be possible to detect the fs/kernel version and error out when 
> versions are found that are known to be broken ?

That was a different issue.

It would be nice, but I don't think it would be practical to try and detect
and work around such file system issues in cp.

There are always going to be teething problems with a large
body of new logic, so I think the best approach with file systems
is to increase trust in the gradually over time.

Personally I'd consider BTRFS for my backup drive at present,
which it should be particularly good at given its snapshot
capabilities.

cheers,
Pádraig.



reply via email to

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