Windows: cm_SetupStoreBIOD compute correct scanEnd
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 18 Dec 2013 13:48:44 +0000 (08:48 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Tue, 24 Dec 2013 14:16:00 +0000 (06:16 -0800)
commitfb6bc16b335d0e50b49ed85570dbe9fc9adfaee0
treed8e3e1bfe4194083243dec3c043b64c33759fff7
parent4f1d4b63a90e85fd0c2edc592d18bdbe6a0b07f8
Windows: cm_SetupStoreBIOD compute correct scanEnd

The algorithm used to ensure "chunk size" operations attempts to
enforce aligned chunks.  There are two problems:

 1. an aligned chunk range may extend beyond the end of the file.

 2. an aligned chunk might end before the requested length of the
    active write.

Protect against scanning beyond the end of the file and do not truncate
writes.

Change-Id: Ibe6caebd78f73d2c93bfef0dcebef379ca843994
Reviewed-on: http://gerrit.openafs.org/10625
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/afsd/cm_dcache.c