From owner-freebsd-bugs@FreeBSD.ORG Mon Dec 18 16:20:35 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2642216A40F for ; Mon, 18 Dec 2006 16:20:35 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC4DB43CA3 for ; Mon, 18 Dec 2006 16:20:34 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kBIGKLKw030374 for ; Mon, 18 Dec 2006 16:20:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kBIGKLBn030373; Mon, 18 Dec 2006 16:20:21 GMT (envelope-from gnats) Date: Mon, 18 Dec 2006 16:20:21 GMT Message-Id: <200612181620.kBIGKLBn030373@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Ulrich Spoerlein Cc: Subject: Re: kern/92785: Using exported filesystem on OS/2 NFS client causes filesystem freeze X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ulrich Spoerlein List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Dec 2006 16:20:35 -0000 The following reply was made to PR kern/92785; it has been noted by GNATS. From: Ulrich Spoerlein To: Konstantin Belousov Cc: bug-followup@freebsd.org Subject: Re: kern/92785: Using exported filesystem on OS/2 NFS client causes filesystem freeze Date: Mon, 18 Dec 2006 16:08:34 +0100 Konstantin Belousov wrote: > Try this (not ever booted kernel with this patch applied, beware). > > Index: ufs/ufs/ufs_lookup.c > =================================================================== > RCS file: /usr/local/arch/ncvs/src/sys/ufs/ufs/ufs_lookup.c,v > retrieving revision 1.82 > diff -u -r1.82 ufs_lookup.c > --- ufs/ufs/ufs_lookup.c 31 Jul 2006 15:44:13 -0000 1.82 > +++ ufs/ufs/ufs_lookup.c 15 Dec 2006 15:42:43 -0000 > @@ -556,7 +553,10 @@ > * that point backwards in the directory structure. > */ > pdp = vdp; > - if (flags & ISDOTDOT) { > + if (dp->i_number == dp->i_ino) { > + VREF(vdp); /* we want ourself, ie "." */ > + *vpp = vdp; > + } else if (flags & ISDOTDOT) { > saved_ino = dp->i_ino; > VOP_UNLOCK(pdp, 0, td); /* race to get the inode */ > error = VFS_VGET(pdp->v_mount, saved_ino, > @@ -565,9 +565,6 @@ > if (error) > return (error); > *vpp = tdp; > - } else if (dp->i_number == dp->i_ino) { > - VREF(vdp); /* we want ourself, ie "." */ > - *vpp = vdp; > } else { > error = VFS_VGET(pdp->v_mount, dp->i_ino, > cnp->cn_lkflags, &tdp); I had a colleague of mine test this while instructing him over the phone and it seems to fix the problem. No deadlocks, no leaks, the OS/2 clients can mount/ls/umount at will. All seems well. Extensive tests have NOT yet been done. I'm also a little uneasy, as the patch changes code that has been there since revision 1.1. I wonder how 4.x managed these OS/2 clients. Perhaps the old nfsd/rpc code rejected these bogus lookups? Anyway, thank you very much for the patch, we will be running it on our server base shortly. Ulrich Spoerlein PS: Since this fix is UFS specific, what's with the other filesystems that can be NFS exported? I think I'll do some test with ext2fs or msdosfs exported filesystems next week.