OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-3707-gaa0046a

Gerrit Code Review
Tue, 9 Apr 2013 10:39:38 -0700 (PDT)

The following commit has been merged in the master branch:
commit 7bb300ad2cfe2fec9698523c59a4e800b4fe635a
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: I2244e1247dcee2c3ca0d95e6ee11de3187d491c5
    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