NFS Client patch

Trond Myklebust (trond.myklebust@fys.uio.no)
Mon, 9 Jul 2001 20:59:18 +0200


>>>>> " " == Craig Soules <soules@happyplace.pdl.cmu.edu> writes:

> Hello, I hope that I am sending this to the appropriate people.
> I have been working on a project known as Self-Securing Storage
> here at Carnegie Mellon University. We have developed our
> storage server to act as an NFSv2 server, and have been using
> the Linux NFSv2 client to do our benchmarking. I have run
> across a small problem with the 2.4 implementation of the Linux
> NFSv2 client.

> The problem is in the readdir() operation. The current cookie
> for a given readdir operation is being stored in the file
> descriptor. The problem is that it is not being reset to 0 if
> a change has been made to the directory as is indicated in the
> NFSv2 spec. This problem is often seen when doing an operation
> such as rm -rf to a large directory tree due to the
> asynchronous remove operation that has been implemented.

The NFSv2 spec says no such thing. It simply says that you set the
cookie to zero when you want to start at the beginning of the
directory. This is only needed when we want to reread the directory
into the page cache.

Your patch will automatically lead to duplicate entries in readdir()
on most if not all servers whenever the attributes on the inode have
been refreshed (whether or not the cache has been invalidated). That's
a bug...

Cheers,
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/