OpenAFS Master Repository branch, openafs-devel-1_7_x, updated. openafs-devel-1_7_17-57-g58e5077

Gerrit Code Review gerrit@openafs.org
Thu, 1 Nov 2012 09:44:27 -0700 (PDT)


The following commit has been merged in the openafs-devel-1_7_x branch:
commit 58e507705c6db508ec75f59b7e8a2d478af53886
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date:   Wed Oct 31 09:53:57 2012 -0400

    Windows: cm_FindVolumeByName refactoring
    
    The cm_volume allocation within cm_FindVolumeByName() was racy.
    Given how locks were obtained and dropped it was possible for two
    threads to both determine that a cm_volume_t object needed to be
    allocated.  It might even have been possible for two threads to
    attempt to allocate the same object.
    
    This refactoring ensures that if a volume cannot be found under
    a read lock that a second search is performed under the write lock
    in case the object had in fact been allocated during the transition.
    
    Once it is determined that an allocation is required, the cm_volumeLock
    is not dropped until the object has been built and inserted into the
    name hash table.   This ensures that two threads cannot attempt to
    allocate a cm_volume object for the same volume group.
    
    InterlockedIncrement is used to manage the cm_data volume count.
    
    Reviewed-on: http://gerrit.openafs.org/8346
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
    Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
    (cherry picked from commit b0283d5f17aafecf258479d6691682af3baaa0fd)
    
    Change-Id: Id007305b27bde907b1cebee7fdd57d985c968fd8
    Reviewed-on: http://gerrit.openafs.org/8351
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

 src/WINNT/afsd/cm_volume.c |  163 ++++++++++++++++++++++++--------------------
 1 files changed, 88 insertions(+), 75 deletions(-)

-- 
OpenAFS Master Repository