coreutils
[Top][All Lists]
Advanced

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

Re: Feature request: Add fibmap/SEEK_HOLE support to sha1sum.


From: Pádraig Brady
Subject: Re: Feature request: Add fibmap/SEEK_HOLE support to sha1sum.
Date: Thu, 05 Sep 2013 17:22:06 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 09/05/2013 04:58 PM, Chris Dew wrote:
> Thanks Pádraig,
> 
> I had avoided fiemap, due to the issue discussed at 
> http://smackerelofopinion.blogspot.co.uk/2010/01/using-fiemap-ioctl-to-get-file-extents.html
>  - I use fibmap instead, but it's only for root.
> 
> Is fiemap now safe?

The issue with fiemap is still there in that IMHO it returns useless data
unless all the data is synced.  We avoid the issue by calling fiemap with the
sync flag set, and this is the reason we restrict fiemap usage to sparse files.

I.E. cp essentially does:

  if block_usage_indicates_sparse
    fiemap_read(SYNC=true);
  else
    traditional_read();

The *sum utilities would benefit greatly from the same logic.
Though this might be a good time to introduce the newer/cleaner
possibly more ubiquitous SEEK_HOLE support.

thanks,
Pádraig.




reply via email to

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