Re: NFS still flakely in 1.3.71

Kees Bakker (kees@tasking.nl)
Tue, 12 Mar 1996 18:29:05 +0100


>>>>> "Joshua M. Thompson": "NFS still flakely in 1.3.71" (Mar 6, 13:33):
>> I can consistantly reproduce this NFS bug, which still exists as of
>> 1.3.71:
>>
>> Go to an NFS mounted directory
>> Make a directory
>> cd into that directory
>> Try to 'ls' (you'll get a message saying that "." is not a directory)
>> Try to 'cd ..' (you'll get a message saying taht ".." is not a directory)
>> cd back to the orignal NFS mounted directory
>> Try to 'ls' (this will work)
>> 'rmdir' the directory you made (this will also work)
>>
>> Consistantly repeatable. I've been trying this both as root and as my
>> "mere mortal" account in my own directory, and it happens the same way
>> every time.

>>>>> "Linus" == Linus Torvalds <Linus.Torvalds@cs.helsinki.fi> writes:
Linus> Hmm, interesting. I am not able to repeat it, but there may be server
Linus> differences. We have a linux NFS server here (with a rather recent and
Linus> patched NFS deamon: the "standard" linux NFS deamon has some problems).
Linus> What kind of setup is your server?

We see the same behaviour. We have an AXP-OSF1 system as NFS server, and
several systems as clients (ULTRIX-MIPS, SunOS, Solaris, Linux, etc.) The
following shell script helps a little bit.
#!/bin/sh
set -x

RNODE=${RNODE-helsinki}
mkdir X
sync
rsh $RNODE sh -c "'ls -ld X'"
rsh $RNODE sh -c "'ls -la X'"
rsh $RNODE sh -c "'cd X;ls -la .'"

rmdir X

Note that this test is not completely valid. The 'sync' does not have to
occur immediate. But anyway, on other hosts you can sometimes see the
message "Stale NFS file handle", but on linux-1.3.72 it doesn't complain
(it gives "total 0" for an "ls -al" command).

I also noted that in fs/nfs/dir.c in the function nfs_refresh_inode() I see
this:
/* Size changed from outside: invalidate caches on next read */
if (inode->i_size != fattr->size)
NFS_CACHEINV(inode);
In other words, only if the size has changed the inode is made invalid. Why
not for other conditions, like mtime?

-- 
============================================================
Kees Bakker                           phone : +31 33 4558584
Tasking BV                              fax : +31 33 4550033
Plotterweg 31                                kees@tasking.nl
Amersfoort, The Netherlands
============================================================
Etc., etc., etc.