Re: Newbie question - missing vop* structures/functions in sys/vnode.h on 10.4
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com -- Terry Is there a sample for the new usage available somewhere ? Thanks ! On Jun 6, 2007, at 11:59 AM, Ratheesh Ramachandran wrote:
Hi,
I need to port some programs from an older version of Mac OS X to 10.4.
These programs use the "vop*" structures/functions from sys/vnode.h. These are apparently no longer available in sys/vnode.h.
Could anybody provide pointers/information on what has changed in this area in 10.4 ? You need to include the kernel framework in your KEXT, and #include <sys/vnode_if.h>. -- Terry
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... Those are for you to write an FS that gets called, not for you to make calls into an FS from kernel mode. The vfs_context_t is a contet on which the call may block, without fear of the credential reference inside it going away. It's effectively a credential reference and unreference, only automatically on your behalf, plus something that sits in the scheduler queue for any sleep or mutex acquisitions to happen on (you MUST treat a vfs_context_t as opaque!!!! This means you can't declare your own, and it means that if you do, some operation on the stace or in the name cache may take it as a promise that the data won't go out of scope, so if it does, you've instantly introduced a stack-smashing bug). If you are trying to do file I/O in the kernel using direct vop calls - don't! You're not going to get the VFS layer locking right. If you are being called by someone in user space, and you are legitimately consuming the VFS layer (e.g. you are a CODAFS implementaiton or something similar), then you will have a context because you will be the reference instance from a user space call into you (and you should look at the NFS server source code in the kernel for examples). On Jun 6, 2007, at 9:34 PM, Ratheesh Ramachandran wrote: So, are the vop*s now to be replaced by vnop*s ? The vnop* functions seem to require an additional argument -- vfs_context_t. ----- Original Message ---- From: Terry Lambert <tlambert@apple.com> To: Ratheesh Ramachandran <ratheesh_jakarta@yahoo.com> Cc: darwin-kernel@lists.apple.com Sent: Thursday, June 7, 2007 9:22:39 AM Subject: Re: Newbie question - missing vop* structures/functions in sys/vnode.h on 10.4 See /System/Library/Frameworks/Kernel.framework/Headers/sys/ vnode_if.h. Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games. This email sent to site_archiver@lists.apple.com
participants (1)
-
Terry Lambert