From owner-freebsd-hackers Sat Sep 8 13: 6:34 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from holly.calldei.com (adsl-208-191-149-190.dsl.hstntx.swbell.net [208.191.149.190]) by hub.freebsd.org (Postfix) with ESMTP id C6AAD37B405; Sat, 8 Sep 2001 13:06:28 -0700 (PDT) Received: (from chris@localhost) by holly.calldei.com (8.11.4/8.9.3) id f88K6Mr06088; Sat, 8 Sep 2001 15:06:22 -0500 (CDT) (envelope-from chris) Date: Sat, 8 Sep 2001 15:06:21 -0500 From: Chris Costello To: Maxim Sobolev Cc: phk@critter.freebsd.dk, brent@rcfile.org, current@FreeBSD.org, hackers@FreeBSD.org Subject: Re: Junior Kernel Hacker task: improve vnode->v_tag Message-ID: <20010908150620.F548@holly.calldei.com> Reply-To: chris@calldei.com References: <20010908030110.E548@holly.calldei.com> <200109081154.OAA95138@www.abc.com.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200109081154.OAA95138@www.abc.com.ua>; from sobomax@FreeBSD.org on Sat, Sep 08, 2001 at 02:54:38PM +0300 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Saturday, September 08, 2001, Maxim Sobolev wrote: > I don't like idea to hardcode the same string ("procfs"), with the > same meaning in several places across kernel. As for your proposition > to use f_fstypename to set v_tag, it is even more bogus because > value of the f_fstypename is supplied from the user level, so > potentially it could be anything and we can't make any reasonable > assumptions about mapping between its value and type of the filesystem > in question. How do you figure? The contents if `f_fstypename' must match a configured file system exactly, so it could _not_ be anything. To quote sys/kern/vfs_syscalls.c:mount(): if ((error = copyinstr(SCARG(uap, type), fstypename, MFSNAMELEN, NULL)) vput(vp); return (error); } for (vfsp = vfsconf; vfsp; vfsp = vfsp->vfc_next) if (!strcmp(vfsp->vfc_name, fstypename)) break; if (vfsp == NULL) { /* ... try and load a module ... */ /* ... fail if no module can be found, or no * matching VFS is loaded */ } -- +-------------------+---------------------------------------------------+ | Chris Costello | You depend too much on computers for information. | | chris@calldei.com | | +-------------------+---------------------------------------------------+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message