From owner-freebsd-current Tue Sep 4 6:58: 8 2001 Delivered-To: freebsd-current@freebsd.org Received: from ipcard.iptcom.net (ipcard.iptcom.net [212.9.224.5]) by hub.freebsd.org (Postfix) with ESMTP id 0ED8737B409; Tue, 4 Sep 2001 06:57:58 -0700 (PDT) Received: from vega.vega.com (dialup6-2.iptelecom.net.ua [212.9.227.66]) by ipcard.iptcom.net (8.9.3/8.9.3) with ESMTP id QAA22072; Tue, 4 Sep 2001 16:57:51 +0300 (EEST) (envelope-from max@vega.com) Received: (from max@localhost) by vega.vega.com (8.11.4/8.11.3) id f84DhO097646; Tue, 4 Sep 2001 16:43:24 +0300 (EEST) (envelope-from sobomax@FreeBSD.org) From: Maxim Sobolev Message-Id: <200109041343.f84DhO097646@vega.vega.com> Subject: Re: Junior Kernel Hacker task: improve vnode->v_tag To: phk@critter.freebsd.dk (Poul-Henning Kamp) Date: Tue, 4 Sep 2001 16:42:03 +0300 (EEST) Cc: brent@rcfile.org (Brent Verner), current@FreeBSD.ORG, hackers@FreeBSD.ORG In-Reply-To: <12839.999606420@critter> from "Poul-Henning Kamp" at Sep 04, 2001 02:27:00 PM X-Mailer: ELM [version 2.5 PL5] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 <20010904081337.A8968@rcfile.org>, Brent Verner writes: > >On 04 Sep 2001 at 10:36 (+0200), Poul-Henning Kamp wrote: > >| > >| Assignment: > >| > >| The v_tag element in struct vnode is a debugging aid, but unfortunately > >| it is implemented in a way which means that adding a filesystem means > >| modifying the definition in . > >| > >| Convert the v_tag to an "const char *" and have the filesystems put > >| their name in there instead. > >| > >| The v_tag has been abused a few places, easily recognizable by the fact > >| that the kernel should never inspect the value of v_tag. > >| These places should be easily changeable to use the new representation. > >| Please mark them with a big fat "/*XXX: ABUSE OF v_tag */" comment. > > > >#include > > > >I've done a /cursory/ look over how this v_tag is used. I'm not sure > >this is a simple/clean as you propose, since this is used in the > >IS_LOCKING_VFS macro, as well as in union_subr.c... > > Well, that is just too bad, because IS_LOCKING_VFS is wrong then. > > The places which inspect v_tag will have to be changed to use > strcmp() then... I think that we can add a new vnode flag, say VCANLOCK, so that each particular VFS can set it if it supports locking, which should allow to remove pre-defined VFS list from the IS_LOCKING_VFS macro. I can produce a patch if it sounds reasonably. -Maxim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message