Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Sep 2001 15:06:21 -0500
From:      Chris Costello <chris@calldei.com>
To:        Maxim Sobolev <sobomax@FreeBSD.org>
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>
In-Reply-To: <200109081154.OAA95138@www.abc.com.ua>; from sobomax@FreeBSD.org on Sat, Sep 08, 2001 at 02:54:38PM %2B0300
References:  <20010908030110.E548@holly.calldei.com> <200109081154.OAA95138@www.abc.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010908150620.F548>