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

Gerrit Code Review
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 <>
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.
    Tested-by: BuildBot <>
    Reviewed-by: Jeffrey Altman <>
    Tested-by: Jeffrey Altman <>
    (cherry picked from commit b0283d5f17aafecf258479d6691682af3baaa0fd)
    Change-Id: Id007305b27bde907b1cebee7fdd57d985c968fd8
    Tested-by: BuildBot <>
    Reviewed-by: Jeffrey Altman <>

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

OpenAFS Master Repository