From owner-freebsd-hackers Fri Dec 6 0:34: 0 2002 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 7324737B401 for ; Fri, 6 Dec 2002 00:33:58 -0800 (PST) Received: from hotmail.com (f28.pav0.hotmail.com [64.4.32.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id D3BF643E4A for ; Fri, 6 Dec 2002 00:33:57 -0800 (PST) (envelope-from oykai@msn.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 6 Dec 2002 00:33:52 -0800 Received: from 210.74.136.33 by pv0fd.pav0.hotmail.msn.com with HTTP; Fri, 06 Dec 2002 08:33:50 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: Fri, 06 Dec 2002 16:33:50 +0800 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 06 Dec 2002 08:33:52.0691 (UTC) FILETIME=[35250830:01C29D02] 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 >The name of the macro is a little strange, that is more of a historical >relic where we used to declare these things in something called a 'linker >set'. These days it is handled by a SYSINIT() function that registers the >vnode ops. I know in mi_startup(),the kernel will try to load the modules registered by SYSINIT. I think its order is: firstly according 'sysinit_sub_id'; secondly,if the 'sysinit_sub_id' are the same, it is accord 'sysinit_elem_order', right? I wonder if both of them is the same, the kernel will try to load which. For example: SYSINIT(nameA, SI_SUB_DRIVERS, SI_ORDER_FIRST, initA, NULL); SYSINIT(nameB, SI_SUB_DRIVERS, SI_ORDER_FIRST, initB, NULL); which do the kernel load firstly? > >Our vnode op system is fully dynamic. We can create new VOP_xxx() >functions >on the fly. But for this to work, they need to be registered and assigned >an index number in the system vectors. The act of referencing a "foo" >vector >in the xxx_opv_desc table adds support for a VOP_FOO(). >For example, suppose we have some remote file system loadable module that >supports remote file copies. That filesystem could introduce >VOP_COPYFILE() that would cause the file to be copied on the server, rather >than the source file being read by the client and then copied back to the >new file. We could then load another module that adds a copyfile(2) >syscall >that calls VOP_COPYFILE(). And because of the vnode stacking system and >the VOP_DEFAULT() vectors, we could even mount union fs's over the top of >this hypothetical file system, even though at the time that unionfs was >compiled there was no VOP_COPYFILE operation to pass down the stack. union fs's means what? FreeBSD's UFS is result that union of UFS and FFS, right? >Quite a while ago, the kernel used to have a static list of supported VOP_* >calls. This has not been the case for quite some time now. Any file >system can create any VOP_* that it likes. Based on your words, I still do not understand those difference among those VOP_SET. :(. I think your viewpoints is that the number of VOP_SETs and the function of VOP_SETs is decided by the filesystem, right? I want to know the general purposes of those VOP_SETs. For example: in FFS: VNODEOP_SET(ffs_vnodeop_opv_desc); I think it is normal operation vectors. VNODEOP_SET(ffs_specop_opv_desc); I think it is special operation vectors. But I do not know its purpose. VNODEOP_SET(ffs_fifoop_opv_desc); I think it is FIFO operation vectors. Why do those three VOP_SETs have many repeated defines? Or All my thought is wrong? Thank you very much! Best Regards Ouyang Kai _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message