Re: NFS Client patch

From: Rob Landley (
Date: Sun Jul 22 2001 - 10:15:07 EST

On Thursday 19 July 2001 14:24, Pavel Machek wrote:
> Hi!
> > > In any case, what happens if the file was renamed or removed between
> > > the 2 readdir calls. A cookie identifying a name that was returned
> > > last, or should be read next is just as volatile as a cookie that
> > > contains an offset into the directory.
> >
> > No, if the file was removed, it still tells you where to start your
> > search. A missing filename is just as good a marker as a present one.
> And if new file is created with same name?
> Pavel

The same thing that happens as if a new file was inserted BEFORE your cursor,
in the part of the directory you've already looked at. You ignore it.

The "filename cookie" indicates the LAST file we looked at. We've already
seen it. Therefore, whether it's the same file or not, we don't care. We
just want the next file AFTER that one.

We're doing fairly arbitrary, unlocked reads across volatile data. No
algorithm is going to behave perfectly here. We just want a behavior that is
consistent, guaranteed to complete, and doesn't violate any obvious
constraints about how filesystems should behave (like producing duplicate
entries, which returning two different sets of data with the same filename
would do).

Makes sense to me, anyway...

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Jul 23 2001 - 21:00:16 EST