From owner-freebsd-hackers Mon Jan 6 19:49:19 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7AACB37B401 for ; Mon, 6 Jan 2003 19:49:17 -0800 (PST) Received: from hotmail.com (f8.pav0.hotmail.com [64.4.33.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00EA943E4A for ; Mon, 6 Jan 2003 19:49:17 -0800 (PST) (envelope-from oykai@msn.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 6 Jan 2003 19:49:16 -0800 Received: from 210.74.136.33 by pv0fd.pav0.hotmail.msn.com with HTTP; Tue, 07 Jan 2003 03:49:15 GMT X-Originating-IP: [210.74.136.33] From: "ouyang kai" To: peter@wemm.org Cc: hackers@FreeBSD.org Subject: Re: One Filesystem vnode operations declare problem. Date: Tue, 07 Jan 2003 11:49:15 +0800 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 07 Jan 2003 03:49:16.0472 (UTC) FILETIME=[C024CB80:01C2B5FF] 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 >From: Peter Wemm >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