Re: NFS weirdness

Bill Hawes (whawes@star.net)
Tue, 03 Mar 1998 11:26:24 -0500


This is a multi-part message in MIME format.
--------------125E04E812D125174982B629
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Erwin J. van Eijk wrote:

> It happens on and off over here. And it disappears for no apparent
> reason.
> Mar 3 11:16:11 hyper kernel: nfs_revalidate_inode: eijk/.Xauthority
> getattr failed, ino=19268, error=-116
> Mar 3 11:16:11 hyper kernel: nfs_revalidate_inode: eijk/.Xauthority
> getattr failed, ino=19268, error=-116

I've attached a small patch to diagnose stale filehandle (error -116) problems.
Could you give this a try and report back the messages?

> What's worse, the HP/UX patchs fixes more or less the trouble I'm
> having with the truncated readdir requests to the HP, but I can no
> longer reliably mount from another Linux box anymore, indifferent
> which nfs server I use (user of kernel). This is what happens on
> client side:
>
> Mar 3 12:48:07 tommie kernel: RPC: task timed out
> Mar 3 12:48:07 tommie kernel: nfs: server hyper not responding, still
> trying
>
> and the server is complaining about the following:
> Mar 3 12:47:40 hyper kernel: UDP: bad checksum. From 8259B579:797 to 8259B567:2049 ulen 204
> Mar 3 12:48:09 hyper last message repeated 9 times

The patch to nfs2xdr.c has two unrelated parts -- one to fix the short readdir
replies, one to pad writes for "garbage args" problems. The second part has to
be manually enabled by uncommenting the define for NFS_PAD_WRITES. If you
uncommented the define, try commenting it out again and see if that changes the
symptoms.

Unfortunately I can't reproduce any of the problems you report here -- both
unfsd and knfsd work fine for me.

Regards,
Bill
--------------125E04E812D125174982B629
Content-Type: text/plain; charset=us-ascii; name="nfs_inode88-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="nfs_inode88-patch"

--- fs/nfs/inode.c.old Tue Jan 27 09:36:34 1998
+++ fs/nfs/inode.c Tue Mar 3 12:02:03 1998
@@ -650,10 +650,29 @@
inode->i_ino);
status = nfs_proc_getattr(server, NFS_FH(dentry), &fattr);
if (status) {
+ int error;
+ u32 *fh;
+ struct nfs_fh fhandle;
#ifdef NFS_PARANOIA
printk("nfs_revalidate_inode: %s/%s getattr failed, ino=%ld, error=%d\n",
dentry->d_parent->d_name.name, dentry->d_name.name, inode->i_ino, status);
#endif
+ if (status != -ESTALE)
+ goto out;
+ /*
+ * A "stale filehandle" error ... show the current fh
+ * and find out what the filehandle should be.
+ */
+ fh = (u32 *) NFS_FH(dentry);
+ printk("NFS: bad fh %08x%08x%08x%08x%08x%08x%08x%08x\n",
+ fh[0],fh[1],fh[2],fh[3],fh[4],fh[5],fh[6],fh[7]);
+ error = nfs_proc_lookup(server, NFS_FH(dentry->d_parent),
+ dentry->d_name.name, &fhandle, &fattr);
+ if (error)
+ goto out;
+ fh = (u32 *) &fhandle;
+ printk(" %08x%08x%08x%08x%08x%08x%08x%08x\n",
+ fh[0],fh[1],fh[2],fh[3],fh[4],fh[5],fh[6],fh[7]);
goto out;
}

--------------125E04E812D125174982B629--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu