site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Regards ----------------------------------------- ----------------- SUPPORTS LOCKLEAF VFS_TBLFSNODELOCK VFS_TBLTHREADSAFE FS must honor ----------------- ----------------- ----------------- NO NO NO YES NO YES NO YES NO YES YES MAYBE ----------------- ----------------- ----------------- -- 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... On Mar 1, 2006, at 8:57 PM, Lex Dejavu wrote: I've read throught bsd/vfs and find it's not checked by any function, although it's set somewhere. It's a hint to the FS to do something (or not) based on the FS's locking model. Locks are now generally asserted on the vp at the VFS layer, rather than below the VFS layer on the inode. We don't internally use it because for the FS's where we would have used it, we support thread reentrancy. For third party FS's that don't support thread reentrancy (i.e. neither VFS_TBLTHREADSAFE nor VFS_TBLFSNODELOCK is set), the locking is per fs, per entry into the VFS, unless that FS advertises that is supports node locking as it's model, which means the FS will take care of locking, and the VFS doesn't need to guard reentrancy on its behalf). If you support locking via inode/cnode/whatevernode locking, you are expected to honor LOCKLEAF, e.g.: The "MAYBE" is based on whether you require both vnode lock an inode lock held spearately or not. If you do, then you must ensure the lock ordering is the same each time you take a lock, and that everything works the same. I do not recommend this model at all. Primarily, this is to allow people to more easily port legacy code, but in general, your best bet is to support VFS_TBLTHREADSAFE and thread reentrancy, and let the VFS layer take care of managing the locking on a per vp reentrancy basis, instead of trying to do this yourself, or shave off some additional concurrency by going pure VFS_TBLFSNODELOCK, which is very hard unless you have a full event/ action graph model for your FS implementation. This email sent to site_archiver@lists.apple.com
participants (1)
-
Terry Lambert