From owner-freebsd-current Sun Jan 5 9:17:48 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 1F5BB37B401 for ; Sun, 5 Jan 2003 09:17:47 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C2C443EC2 for ; Sun, 5 Jan 2003 09:17:46 -0800 (PST) (envelope-from phk@freebsd.org) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id h05HHYAS008326; Sun, 5 Jan 2003 18:17:34 +0100 (CET) (envelope-from phk@freebsd.org) To: Bruce Evans Cc: current@freebsd.org Subject: Re: specfs lock plumbing broken From: phk@freebsd.org In-Reply-To: Your message of "Mon, 06 Jan 2003 04:06:20 +1100." <20030106031002.N295-100000@gamplex.bde.org> Date: Sun, 05 Jan 2003 18:17:34 +0100 Message-ID: <8325.1041787054@critter.freebsd.dk> 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 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! :-/ I always wondered why specfs would insist on no locking, but I never had much ambition for finding out. >Fixing specfs is simple: This is not tested with DEVFS I take it ? > >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. >- 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 ? >- deadfs is also missing an override for vop_islocked. This is OK provided > it is never passed locked vnodes. I have no opinion on this one. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message