tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: device vnodes, and structural confusion



On Mon, Jun 17, 2013 at 06:48:23PM +0200, J. Hannken-Illjes wrote:
 > >   1. Rename v_mount, which is the filesystem the vnode is on (almost
 > >   always / for device vnodes), to "v_myfs".
 > 
 > What is wrong with this name?  `v_mount' is the `struct mount' this
 > vnode resides on and I don't see any confusion.

People think it means "the fs mounted here"; the problem is that if
you know there's such a field, this one looks like the one you're
looking for and there's no obvious indication that you're wrong.

(Also in the long run we need to split a struct vfs out of struct
mount and if we don't change the name first it'll need to be done then
anyhow.)

 > >   2. Rather than renaming v_specmountpoint, which is the filesystem
 > >   mounted on a device vnode, kill it off entirely, and replace it
 > >   with an inline (or noninline) function "specvn_getmountedfs()".
 > >   Make this function assert if called on a non-VBLK vnode instead of
 > >   silently producing trash.
 > 
 > Yes, please.  While here, you could account for spec node aliases like:
 > [snip]

I don't think that's quite right... but checking that there's only one
mounted fs among all the vnodes for the same device seems reasonable,
yes.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index