OpenAFS Master Repository branch, openafs-devel-1_7_x, updated. openafs-devel-1_7_23-32-g55d82bf

Gerrit Code Review
Tue, 9 Apr 2013 20:19:39 -0700 (PDT)

The following commit has been merged in the openafs-devel-1_7_x branch:
commit 00550ff8a41b530fa1e4fcd287c50d03803d2bb4
Author: Jeffrey Altman <>
Date:   Tue Apr 9 08:12:29 2013 -0400

    Windows: Race between NonCached and Cached Writes
    The following race was identified by Rod Widdowson.
     A. File is complete up to 1000 Eof=1000, VDL=1000
     B. File Eof is set to 2000.  Eof=2000, VDL=1000 (SetInfo doesn't move VDL)
     C. Locks dropped.
    Thread1) Write comes in for 1000 for 500.  This is not extending.
             Locks taken shared.
    Thread1) Data Written to Server.  Thread stalls.
    Thread2) Read comes in for 1000 for 1000.  Locks taken shared
             so it proceeds.
    Thread2) CcRead calls CcZero and so the cache get zeros from 1000 to 2000
    Thread1) VDL moves forward.
    The windows cache is now poisoned between 1000 and 1500 and protected by
    the VDL.  Any future reads gets the wrong data and any write to that part
    will cause an overwrite of zeros.
    Instead of holding the Fcb->NPFcb->Resource and
    Fcb->NPFcb->SectionObjectResource shared during a NonCached write, hold it
    exclusive because the write is occurring behind the back of the windows
    Change-Id: Ifffbc6dd36a6ed79766be1f2d3e729f23f41fe3f
    Tested-by: BuildBot <>
    Reviewed-by: Rod Widdowson <>
    Reviewed-by: Peter Scott <>
    Reviewed-by: Jeffrey Altman <>

 src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

OpenAFS Master Repository