From owner-freebsd-current Tue Sep 4 5:13:51 2001 Delivered-To: freebsd-current@freebsd.org Received: from habanero.hesketh.net (habanero.hesketh.net [66.45.6.196]) by hub.freebsd.org (Postfix) with ESMTP id B921137B409; Tue, 4 Sep 2001 05:13:42 -0700 (PDT) Received: from mutt.rcfile.org (rdu57-26-120.nc.rr.com [66.57.26.120]) by habanero.hesketh.net (8.11.1/8.11.1) with ESMTP id f84CDdo11116; Tue, 4 Sep 2001 08:13:39 -0400 X-Received-From: brent@mutt.rcfile.org X-Delivered-To: phk@FreeBSD.ORG X-Spam-Filter: check_local@habanero.hesketh.net by digitalanswers.org X-More-Information: http://spamfighter.hesketh.net Received: (from brent@localhost) by mutt.rcfile.org (8.11.6/8.11.5) id f84CDbu17179; Tue, 4 Sep 2001 08:13:37 -0400 (EDT) (envelope-from brent) Date: Tue, 4 Sep 2001 08:13:37 -0400 From: Brent Verner To: Poul-Henning Kamp Cc: current@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: Junior Kernel Hacker task: improve vnode->v_tag Message-ID: <20010904081337.A8968@rcfile.org> References: <2231.999592597@critter> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2231.999592597@critter> User-Agent: Mutt/1.3.21i 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 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... These uses /seem/ fairly significant due to the fact that the v_tag is being used to determine capabilities of the vnode in question. How should this be worked around? It would be fairly trivial to change v_tag to v_feature (or similar) then add the v_tag as you propose. I suggest this since those _tests_ for features should IMO not be done with a char[] operation, since that would (in my ignorant estimation) have a very negative effect on fs performance. Of course, my suggested v_feature hack would again require changing vnode.h for new features, but this is (assumedly) less frequent than modifying for file systems. I'll work on this this weekend, and (hopefully) follow thru with a patch. cheers. Brent -- "Develop your talent, man, and leave the world something. Records are really gifts from people. To think that an artist would love you enough to share his music with anyone is a beautiful thing." -- Duane Allman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message