Date: Mon, 6 Jan 2003 05:47:21 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: phk@freebsd.org Cc: current@freebsd.org Subject: Re: specfs lock plumbing broken Message-ID: <20030106050703.N401-100000@gamplex.bde.org> In-Reply-To: <8325.1041787054@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030106050703.N401-100000>