[OpenAFS-devel] Client vnode locking question

Chaskiel M Grundman cg2v@andrew.cmu.edu
Thu, 02 Oct 2003 22:44:05 -0400


--On Thursday, October 02, 2003 22:24:53 -0400 Garrett Wollman
<wollman@khavrinen.lcs.mit.edu> wrote:

>  I've read the comment at the top of this function, which is a
> nice summary that seems to totally miss the mark, since the locking
> protocol is determined by the operating system and not by the AFS
> code anyway.

The comments in GetVcache aren't relevant to operating system locks
(vn_lock), they're relevant to the vcache lock
(Obtain[Read|Write]Lock(&avc->lock), which protects afs metadata, not
operating system metadata. The operating system's invariants cannot simply
be mapped onto afs's locks, since that could end up violating afs locking
invariants (e.g. cannot hold afs_xvcache while holding a vcache write lock
and vice-versa). I would think this would be obvious, so what is it that
you're really complaining about?