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 Mon, Aug 08, 2011 at 12:15:03AM +0000, David Holland wrote:
> On Sun, Aug 07, 2011 at 10:03:34PM +0200, Reinoud Zandijk 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.

eric


Home | Main Index | Thread Index | Old Index