tech-kern archive

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

Re: RFC: lseek() extensions: SEEK_HOLE / SEEK_DATA with patch

On Sun, Aug 07, 2011 at 08:39:51PM -0500, Eric Haszlakiewicz wrote:
 > > > > Even your example code does this: it seeks repeatedly, teleporting the
 > > > > seek pointer all over the place for no reason, then does a bunch of
 > > > > reads.
 > > > > > So yes, it changes the file pointer too but thats a side-effect
 > > > 
 > > > See above; if it didn't change the file pointer then it would
 > > > still work...
 > > 
 > > But it does change the file pointer, and it shouldn't.
 > fwiw, this was covered by conversations the linux guys had about
 > this interface.
 > If you do a search you should be able to find it (I think I just looked for
 > "SEEK_HOLE"), but the quick summary was that, yes seeking isn't (always)
 >  necessary but the API is being kept compatible with what Solaris does.  
 > Additionally, a suggestion was made to also add FIND_DATA and
 > FIND_HOLE flags, which don't adjust the file pointer.

It's still functionality unrelated to seeking, though. (And all the
more so if it's changed not to seek...)

Choosing someone else's silly design merely because they implemented it
first is not a good policy.

David A. Holland

Home | Main Index | Thread Index | Old Index