From: Jeffrey Altman Date: Wed, 16 Nov 2011 00:00:05 +0000 (-0500) Subject: Windows: cm_SetupStoreBIOD use firstModOffset chunk X-Git-Tag: upstream/1.8.0_pre1^2~3037 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=320c7292e6ae014e44e89b0da736bcc04ef42b2b;p=packages%2Fo%2Fopenafs.git Windows: cm_SetupStoreBIOD use firstModOffset chunk When cm_SetupStoreBIOD attempts to store a chunk to the file server it should not use *inOffsetp as the start of the range. There is no guarantee that the buffer at *inOffsetp is dirty. Instead use firstModOffset which refers to the first known dirty buffer in the range specified by the caller. Attempt to fill a chunk of consecutive dirty buffers from that point. Change-Id: I468e896b046192461d6fe0dc3669e5feeb7886ba Reviewed-on: http://gerrit.openafs.org/6057 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/cm_dcache.c b/src/WINNT/afsd/cm_dcache.c index 1598714cd..9a7e82a0a 100644 --- a/src/WINNT/afsd/cm_dcache.c +++ b/src/WINNT/afsd/cm_dcache.c @@ -1088,8 +1088,8 @@ long cm_SetupStoreBIOD(cm_scache_t *scp, osi_hyper_t *inOffsetp, long inSize, biop->offset = firstModOffset; bufp = NULL; /* this buffer and reference added to the queue */ - /* compute the window surrounding *inOffsetp of size cm_chunkSize */ - scanStart = *inOffsetp; + /* compute the window surrounding firstModOffset of size cm_chunkSize */ + scanStart = firstModOffset; scanStart.LowPart &= (-cm_chunkSize); thyper = ConvertLongToLargeInteger(cm_chunkSize); scanEnd = LargeIntegerAdd(scanStart, thyper);