From owner-freebsd-current Sun Jan 5 10:47: 4 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C09337B406; Sun, 5 Jan 2003 10:47:02 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D7C743ED8; Sun, 5 Jan 2003 10:47:00 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id FAA21267; Mon, 6 Jan 2003 05:46:57 +1100 Date: Mon, 6 Jan 2003 05:47:21 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: phk@freebsd.org Cc: current@freebsd.org Subject: Re: specfs lock plumbing broken In-Reply-To: <8325.1041787054@critter.freebsd.dk> Message-ID: <20030106050703.N401-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 5 Jan 2003 phk@freebsd.org wrote: > In message <20030106031002.N295-100000@gamplex.bde.org>, Bruce Evans writes: > > >The following change uncovers bugs in specfs locking and other places: > > Wow, that was fun! :-/ It took a while, yes %-). > I always wondered why specfs would insist on no locking, but I never > had much ambition for finding out. Me too. It seems to be mostly a mistake. > >Fixing specfs is simple: > > This is not tested with DEVFS I take it ? It doesn't affect devfs because devfs doesn't go through ufs. It goes straight to the default vnodeop table so it gets std* since it doesn't override them. > >Bugs found while investigating this: > >- spec_print() is unreachable because ufs_vnops.c overrides it. > >- spec_print() is of low quality: it doesn't print the device name or number. > > spec_print should probably just be retired, after all specfs is only > a set of common helper functions and not a filesystem as such. It can remove some knowledge of devices from ufs. There are similar problems for vprinting fifos. > >- the vop tables work even worse than might first appear. > > I agree, but I have no ambition to fiddle with the mechanics of them. > > >- other entries in specfs's vop table seem to be unreachable or unnecessary > > (because the default is better). > > Suggestions ? Surely the table doesn't need so many vop_panic's? Panicing for unsupported things should be the default. I can't see where some of the others are called. I'm getting some other panics. One while writing this was "bwrite: buffer is not busy???". Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message