[OpenAFS-devel] [PATCH] fix openafs crashes on linux 2.6.10-2.6.12, and all RHEL4 kernels

Chaskiel M Grundman cg2v@andrew.cmu.edu
Wed, 18 Apr 2007 15:05:35 -0400


--On Wednesday, April 18, 2007 02:45:36 PM -0400 Christopher Allen Wing 
<wingc@engin.umich.edu> wrote:

> I don't understand the usage of AFS_GLOCK(); why is it safe to drop and
> re-acquire it in cases like this?  Is AFS_GLOCK intended to serialize all
> AFS calls coming from vnode methods in the kernel?

AFS_GLOCK is intended to prevent smp concurrency (and preemption). It also 
provides mutual exclusion for ObtainXXXLock. AFS_GLOCK is dropped almost 
any time the cache manager is going to sleep.