NewsOS vs [pre6] NFS client workaround

Olaf Flebbe (O.Flebbe@science-computing.uni-tuebingen.de)
Mon, 27 May 1996 15:37:44 +0200 (MET DST)


Hi,

there is a horrible bug in the Sony NewsOS 4.1R NFS server which
totaly confuses the Linux NFS client attribute cache.

When creating directories it returns the inode of the parent dir
rather the newly created one.

This bug is related to the syslog message:
nfs_refresh_inode: inode number mismatch

If you have a Sony: Simply type mkdir 1; mkdir 1/2 on a Sony exported
FS and you are lost ;-) It took me 6 Hours to find this ;-(

Cheers,
Olaf

--- dir.c.orig Fri Apr 26 17:40:22 1996
+++ dir.c.new Mon May 27 15:27:10 1996
@@ -476,7 +476,7 @@
sattr.atime.seconds = sattr.mtime.seconds = (unsigned) -1;
error = nfs_proc_mkdir(NFS_SERVER(dir), NFS_FH(dir),
name, &sattr, &fhandle, &fattr);
- if (!error)
+ if (!error && /* NewsOS 4.1R Bug */ (fattr.fileid != dir->i_ino))
nfs_lookup_cache_add(dir, name, &fhandle, &fattr);
iput(dir);
return error;

-- 
  Dr. Olaf Flebbe                            Phone +49 (0)7071-9457-32
  science + computing gmbh                     FAX +49 (0)7071-9457-27
  Hagellocher Weg 71
  D-72070 Tuebingen  Email: o.flebbe@science-computing.uni-tuebingen.de