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
cache.

Change-Id: Ifffbc6dd36a6ed79766be1f2d3e729f23f41fe3f
Reviewed-on: http://gerrit.openafs.org/9754
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-on: http://gerrit.openafs.org/9767
Windows: CcPurge range modified by non-cached write

When a non-cached non-paging write occurs, the update bypasses the
Windows cache.  As a result any cached data in the modified range is
now invalid and must be purged.

CcPurgeCacheSection is known to trigger some filter drivers to open
the file from a worker thread.  To avoid a deadlock on the
Fcb->NPFcb->Resource that resource must be dropped.  Holding the
SectionObjectResource exclusive is sufficient to protect against races
with other writes, reads and SetEndOfFile operations.  While purging the
cache prior to calling the service might be more desireable, it cannot be
done safely without violating the lock hierarchy.  Therefore, the purge is
performed after any call to the service completes.

Change-Id: I08cd6d9d25f1395e9b5b71dc225ae5827bbe33c7
Reviewed-on: http://gerrit.openafs.org/9756
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-on: http://gerrit.openafs.org/9768