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 11:10:52 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0

On 07/31/2012 10:14 AM, Jim Meyering wrote:
> Can you outline how a grep -r X A B C might go astray due to such a
> cache entry becoming stale, assuming we clear the cache between command
> line arguments?

For example, one could have 'grep -R X A', where A contains symlinks
that point into another file system, and that file system could
be remounted between the time one symlink is visted, and the next.

The problem could occur without symlinks as well.  A could be a
tree above two mounted file systems A/F and A/G.  'grep -r X A' visits
A/F first.  After it stops visiting A/F, A/F is unmounted
and A/G mounted, with the same device number as A/F.  grep then visits
A/G and uses incorrect cached info about A/G's status.

xstat should work, assuming it's designed well.
But surely SEEK_HOLE will be available sooner, for ext4.
I see there's active development in that area now
<http://comments.gmane.org/gmane.linux.file-systems/66117>.



reply via email to

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