From owner-freebsd-bugs Sat May 24 02:20:22 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id CAA15761 for bugs-outgoing; Sat, 24 May 1997 02:20:22 -0700 (PDT) Received: from nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id CAA15749 for ; Sat, 24 May 1997 02:20:19 -0700 (PDT) Received: from herring.nlsystems.com (herring.nlsystems.com [10.0.0.2]) by nlsystems.com (8.8.5/8.8.5) with SMTP id KAA07265; Sat, 24 May 1997 10:20:10 +0100 (BST) Date: Sat, 24 May 1997 10:20:10 +0100 (BST) From: Doug Rabson To: Peter Wemm cc: Tor Egge , freebsd-bugs@hub.freebsd.org Subject: Re: kern/3581: trap 12 in lockstatus() In-Reply-To: <199705240811.QAA20320@spinner.dialix.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Sat, 24 May 1997, Peter Wemm wrote: > Doug Rabson wrote: > > > > There is also the VOP_ISLOCKED race to deal with which, I think, is more > > common. I have seen it a couple of times. One solution would be to > > change *all* calls to VOP_ISLOCKED to vn_islocked which would check VXLOCK > > before calling the filesystem. Another would be to change all VFS' > > VOP_ISLOCKED to check VXLOCK. > > I'm up to my eyeballs in a sweep over the code to implement poll. One of > the things that I've noticed is that many of the fs _lock routines simply > call the vop_nolock or whatever routines. There are some seriously ugly and > /or evil bits of code in there. :-( The vop_nolock routine is supposed to be a simple shared lock for filesystems which don't need node locking. The shared lock is still needed because vclean needs a true exclusive lock to avoid races. Unfortunately most of the filesystems don't honour the locking protocol so vop_nolock is stubbed out. I fixed NFS to do locking properly and created vop_sharedlock (an un-stubbed version of vop_nolock) but I never got around to fixing the other filesystems. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 951 1891 Fax: +44 181 381 1039