Subject: Re: NFS server locking
To: Michael Richardson <mcr@sandelman.ottawa.on.ca>
From: Frank van der Linden <frank@wins.uva.nl>
List: port-i386
Date: 11/21/1997 16:14:59
On Fri, Nov 21, 1997 at 03:13:25PM +0200, Michael Richardson wrote:
>
> Running 1.2 on an NetBSD/i386 NFS server.
> Running 1.3 alpha on the client, with a 1.2 userland. I'm building
> 1.3 over NFS.
> The server dies, repeatedly, with a panic in:
> nfsrv_readdir
> nfssvc_nfsd
> sys_nfssvc
Do you have a little more detail than that, i.e. the panic message
itself? This problem is likely to have been fixed since 1.2, there
was an off by one error in nfsrv_readdir{plus}, which was fixed
in 1.2.1 already.
You can apply the following diff to your 1.2 source tree (though you
might need to remove the $NetBSD$ RCS ids from the diff for it to apply
cleanly).
- Frank
Index: nfs_serv.c
===================================================================
RCS file: /a/cvsroot/src/sys/nfs/nfs_serv.c,v
retrieving revision 1.27
retrieving revision 1.29
diff -c -r1.27 -r1.29
*** nfs_serv.c 1996/12/11 00:01:56 1.27
--- nfs_serv.c 1997/01/31 16:12:26 1.29
***************
*** 1,4 ****
! /* $NetBSD: nfs_serv.c,v 1.27 1996/12/11 00:01:56 fvdl Exp $ */
/*
* Copyright (c) 1989, 1993
--- 1,4 ----
! /* $NetBSD: nfs_serv.c,v 1.29 1997/01/31 16:12:26 fvdl Exp $ */
/*
* Copyright (c) 1989, 1993
***************
*** 2540,2547 ****
dp = (struct dirent *)cpos;
cookiep = cookies;
! while ((dp->d_fileno == 0 || dp->d_type == DT_WHT) &&
! cpos < cend && ncookies > 0) {
cpos += dp->d_reclen;
dp = (struct dirent *)cpos;
cookiep++;
--- 2540,2547 ----
dp = (struct dirent *)cpos;
cookiep = cookies;
! while (cpos < cend && ncookies > 0 &&
! (dp->d_fileno == 0 || dp->d_type == DT_WHT)) {
cpos += dp->d_reclen;
dp = (struct dirent *)cpos;
cookiep++;
***************
*** 2804,2811 ****
dp = (struct dirent *)cpos;
cookiep = cookies;
! while ((dp->d_fileno == 0 || dp->d_type == DT_WHT)
! && cpos < cend && ncookies > 0) {
cpos += dp->d_reclen;
dp = (struct dirent *)cpos;
cookiep++;
--- 2804,2811 ----
dp = (struct dirent *)cpos;
cookiep = cookies;
! while (cpos < cend && ncookies > 0 &&
! (dp->d_fileno == 0 || dp->d_type == DT_WHT)) {
cpos += dp->d_reclen;
dp = (struct dirent *)cpos;
cookiep++;