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: Paul Eggert
Subject: Re: SEEK_HOLE defined but useless on linux-3.4+/ext4 [Re: small ascii files can be sparse
Date: Tue, 31 Jul 2012 08:33:06 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0

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.



reply via email to

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