Date: Tue, 04 Sep 2001 15:59:15 +0200 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: Maxim Sobolev <sobomax@FreeBSD.ORG> Cc: brent@rcfile.org (Brent Verner), current@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: Junior Kernel Hacker task: improve vnode->v_tag Message-ID: <57177.999611955@critter> In-Reply-To: Your message of "Tue, 04 Sep 2001 16:42:03 %2B0300." <200109041343.f84DhO097646@vega.vega.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <200109041343.f84DhO097646@vega.vega.com>, Maxim Sobolev writes: >> >> 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 <sys/vnode.h>. >> >| >> >| 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 <newbie_kernel_hacker_warning.h> >> > >> >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. Yeah, I think that makes a lot of sense. -- 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?57177.999611955>