NFS client bug introduced in 2.2.13pre14

Patrick J. LoPresti (patl@cag.lcs.mit.edu)
30 Sep 1999 18:36:01 -0400


Or maybe pre13 or pre12; I have not been keeping track exactly.
Anyway, here is what happens.

Client is 2.2.13pre14. Server is user mode NFS daemon in Red Hat 5.1
(plus updates). We have a program which creates a lot of files in one
NFS-mounted directory, then executes a "move-if-changed" script to
conditionally rename the files into another directory (which may
already be populated). Then we compile the files. Sometimes the
compilation fails with a "stale file handle" error on one of the
renamed files.

Looking over the patches and source, I think the problem has to do
with the elimination of the "update" flag and the elimination of the
call to "d_drop(old_dentry)" in dir.c:nfs_rename(), circa line 1140.
In pre14, instead of dropping the old dentry, the code calls
d_move(old_dentry, new_dentry) at the end of the function. Since the
NFS file handle is part of the dentry, couldn't this result in the old
file handle being used to access the new file?

I do not understand the code well enough to submit a patch (or even to
be certain this is the bug), but the problem is definitely real...

- Pat

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