windows-merge-status-20070206

when merging status for store data ops, use the fileHashTable to reduce
the number of buffers we must examine
This commit is contained in:
Jeffrey Altman 2007-02-06 16:46:09 +00:00
parent 4e8bc6d501
commit 55653d5dd0

View File

@ -1414,16 +1414,13 @@ void cm_MergeStatus(cm_scache_t *scp, AFSFetchStatus *statusp, AFSVolSync *volp,
if ((flags & CM_MERGEFLAG_STOREDATA) &&
statusp->DataVersion - scp->dataVersion == 1) {
afs_uint32 i;
cm_buf_t *bp;
for (i = 0; i < cm_data.buf_hashSize; i++)
for (bp = cm_data.buf_fileHashTablepp[BUF_FILEHASH(&scp->fid)]; bp; bp=bp->fileHashp)
{
for(bp = cm_data.buf_hashTablepp[i]; bp; bp=bp->hashp) {
if (cm_FidCmp(&scp->fid, &bp->fid) == 0 &&
bp->dataVersion == scp->dataVersion)
bp->dataVersion = statusp->DataVersion;
}
if (cm_FidCmp(&scp->fid, &bp->fid) == 0 &&
bp->dataVersion == scp->dataVersion)
bp->dataVersion = statusp->DataVersion;
}
}