Subject: Re: CVS commit: src
To: None <>
From: YAMAMOTO Takashi <>
List: tech-kern
Date: 06/22/2004 03:16:22
> You mean (because vp is already locked and the vn_lock() will fail):
> 	lockmgr(snaplk, ...);
> 	mark vp as snapshot;

yes, you're right.

> Yes, this looks equivalent. But it still costs an extra function call on
> every vn_lock() (ffs_lock->genfs_lock instead of genfs_lock) and
> VOP_UNLOCK() while transferlockers() only costs an extra test
> "if (lkp->lk_newlock != NULL)".

if you don't like the function call overhead,
you can simply inline genfs_lock.  ie. call lockmgr directly.
i personally don't think that the overhead is a problem in this case, though.