bug-grep
[Top][All Lists]
Advanced

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

Re: SEEK_HOLE defined but useless on linux-3.4+/ext4 [Re: small ascii fi


From: Eric Blake
Subject: Re: SEEK_HOLE defined but useless on linux-3.4+/ext4 [Re: small ascii files can be sparse
Date: Tue, 31 Jul 2012 11:27:51 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0

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   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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