Date: Tue, 07 Jan 2003 11:49:15 +0800 From: "ouyang kai" <oykai@msn.com> To: peter@wemm.org Cc: hackers@FreeBSD.org Subject: Re: One Filesystem vnode operations declare problem. Message-ID: <F8OV1EetVoMDrxxnSYe000002bc@hotmail.com>
index | next in thread | raw e-mail
>From: Peter Wemm <peter@wemm.org>
>It is up to the file system to get it right. The normal procedure is to
>use namei() which does VOP_LOOKUP() calls to each file system. As a side
>effect of doing a lookup, the file system itself returns a "new" vnode
>pointer that corresponds to the name being looked up. If we are using a
>ufs/ffs file system then the fs code will set the operations vector in the
>vnode iself to point to either the specfs or regular vop entries. See v_op
>in struct vnode. For devfs and the seperate /dev case it is similar..
>for devfs there are two types of vnodes.. The first is the "special"
>device type (devfs_specop_entries[]), and the second is the vnodes that
>are used for traversing the directory structure (directory files, symlinks
>etc) - devfs_vnodeop_entries[]. The selection is done here:
> error = getnewvnode("devfs", mp, devfs_vnodeop_p, &vp);
>or
> vp->v_op = devfs_specop_p;
>
>If you have a look at vnode_if.c and vnode_if.h in the compile
>directory, that should give a few more clues too. sys/kern/vfs_init.c
>constructs the tables that these inlines use.
>Cheers,
>-Peter
Thank you very much! I have read vnode_if.c, vnode_if.h and
sys/kern/vfs_init.c and understand the vfs initialization.
I have read the John Shelby Heidemann dissertation "Stackable Design of
File Systems". I have some questions.
About "Coherence Architecture", in FreeBSD, how is it implemented? Should I
read which part code?
About "Featherweight Layer", in FreeBSD, how is it implemented? Should I
read which part code? Could you give me some clues?
I have not a clear idea about Stackable VFS, I hope read the FreeBSD kernel
source to understand the real VFS implementation. Thank your help!
Best Regards
Ouyang Kai
_________________________________________________________________
The new MSN 8 is here: Try it free* for 2 months
http://join.msn.com/?page=dept/dialup
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F8OV1EetVoMDrxxnSYe000002bc>
