On 07/31/2012 09:33 AM, Paul Eggert wrote:
> On 07/31/2012 12:05 AM, Jim Meyering wrote:
>> Given the knowledge that we're using one of those non-compressing file
>> systems, the legacy heuristic will work.
> 
> I originally coded it up that way, using the st_fstype member
> that Solaris has -- this is more convenient and more accurate
> than the dance with statvfs.  But I gave it up on the grounds
> that any system sane enough to have st_fstype already has
> a working SEEK_HOLE (or is so old that we don't care about it....).
> 
> Maybe while we're asking for SEEK_HOLE, we can also ask for
> st_fstype?  The problem with the statvfs dance is that it opens
> up race conditions when some other process is doing mounts.

I think Linux' 'struct stat' is full already; the best we can hope for
is an implementation of xstat() that gives us the information we want
(other nice fields to add would be st_btim for birth-time on file
systems that support it, matching what BSD and cygwin already had room
to provide as part of stat()).  But I certainly want xstat(); I'm
surprised to see that the discussion about the new interface in 2010
appears to have died off, rather than proceeding all the way to getting
it in the kernel.

-- 
Eric Blake   [email protected]    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to