OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_0pre5-10-g1c063d1

Gerrit Code Review gerrit@openafs.org
Tue, 17 May 2011 07:46:32 -0700 (PDT)


The following commit has been merged in the openafs-stable-1_6_x branch:
commit adfe378df858aef951b0a30b640e46ad1feefb2d
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Tue May 10 12:54:53 2011 -0500

    libafs: Do not write-lock afs_xserver on ICBS
    
    Our RXAFSCB_InitCallBackState* handler currently write-locks
    afs_xserver when it clears the SCAPS_KNOWN flag for the relevant
    server. However, the afs_xserver lock is for protecting the global
    list and hash table of server structures, and is not necessary to
    acquire in order to modify the flags of an individual server struct.
    For instance, CkSrv_GetCaps does not acquire any locks to modify the
    server flags.
    
    Taking this lock conflicts with a read lock on afs_xserver acquired by
    afs_FlushVCBs when it traverses the list of server structures.
    afs_FlushVCBs may contact a server that then calls InitCallBackState
    on us, causing a deadlock if ICBS waits for the afs_xserver lock.
    
    So, avoid locking afs_xserver in this case, to avoid that deadlock.
    
    Reviewed-on: http://gerrit.openafs.org/4639
    Tested-by: Andrew Deason <adeason@sinenomine.net>
    Reviewed-by: Derrick Brashear <shadow@dementia.org>
    (cherry picked from commit ae638fa383b8270fe2461a2ad91b9101c74f3593)
    
    Change-Id: I095c74f51f1ddb74ebaecda221ca45a4f6ad09c8
    Reviewed-on: http://gerrit.openafs.org/4663
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Derrick Brashear <shadow@dementia.org>

 src/afs/afs_callback.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

-- 
OpenAFS Master Repository