bh> The attached patch for 2.1.71 nfs/dir.c makes some changes to avoid busy
bh> inodes when unlinking, and has a work-around for an apparent problem
bh> with AIX servers (and possibly others.)
bh> The patch reworks the logic for unlink and rmdir to free the inode in
bh> advance of the operation, to avoid a race in case the server puts the
bh> inode back in use before the reply returns. A similar change may be
bh> needed for rename, but for now this will do.
bh> A problem has just been reported with AIX nfs servers, some of which
bh> apparently fail to provide a filled-in fattr after a mkdir. The
bh> work-around is to test for a valid mode and drop the dentry if it's not
bh> OK. This will force a new lookup which should return a good fattr.
bh> Hopefully these changes will correct the occasional "busy inode"
bh> messages people have reported.
[deleted]
I'm sorry to report this, but this patches don't seem to correct the
errors in every case.
Log messages, home directory NFS mounted from usnfsd server on
linux-2.0.29 (update planned, but this is our main NFS server).
Dec 6 23:01:54 loki kernel: nfs_safe_remove: mla/.Xauthority-n inode busy?? i_count=2, i_nlink=2
Dec 6 23:01:54 loki kernel: nfs_safe_remove: mla/.Xauthority-c inode busy?? i_count=2, i_nlink=2
The previous two lines are displayed whenever i log in from xdm.
Dec 6 23:04:17 loki kernel: nfs_rename: target x/init busy, d_count=2
This one is triggered by the ddd 2.2 debugger when trying to save a
session.
(strace follows)
open("/users/mla/.ddd/sessions/x/init", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=156, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40008000
read(6, "! DDD initialization file\n!....", 4096) = 156
open("/users/mla/.ddd/sessions/x/init#", O_WRONLY|O_CREAT|O_TRUNC, 0664) = 7
..........
write(7, "! DDD initialization file\n! ...", 3889) = 3889
close(7) = 0
munmap(0x40009000, 4096) = 0
rename("/users/mla/.ddd/sessions/x/init#", "/users/mla/.ddd/sessions/x/init") = -1 EBUSY (Device or resource busy)
--
Michael Lausch/g.a.m.s. edv dienstleistungen gmbh
See my web page <http://www.gams.net/~mla> or query PGP key server for PGP key.
"Reality is that which, when you stop believing in it, doesn't go away".
-- Philip K. Dick