Changeset 27557 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Mar 20, 2010 9:14:43 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 59075
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PDMAsyncCompletionFile.cpp
r27495 r27557 868 868 PPDMACEPFILEMGR pAioMgr = NULL; 869 869 870 pEpFile->cbEndpoint = pEpFile->cbFile; 870 871 pEpFile->pTasksFreeTail = pEpFile->pTasksFreeHead; 871 872 pEpFile->cTasksCached = 0; … … 970 971 AssertRC(rc); 971 972 973 /* endpoint and real file size should better be equal now. */ 974 AssertMsg(pEpFile->cbFile == pEpFile->cbEndpoint, 975 ("Endpoint and real file size should match now!\n")); 976 972 977 /* 973 978 * If the async I/O manager is in failsafe mode this is the only endpoint … … 1051 1056 STAM_PROFILE_ADV_STOP(&pEpFile->StatWrite, Write); 1052 1057 1058 /* Increase endpoint size. */ 1059 if ( RT_SUCCESS(rc) 1060 && ((uint64_t)off + cbWrite) > pEpFile->cbEndpoint) 1061 ASMAtomicWriteU64(&pEpFile->cbEndpoint, (uint64_t)off + cbWrite); 1062 1053 1063 return rc; 1054 1064 } … … 1088 1098 PPDMASYNCCOMPLETIONENDPOINTFILE pEpFile = (PPDMASYNCCOMPLETIONENDPOINTFILE)pEndpoint; 1089 1099 1090 *pcbSize = ASMAtomicReadU64(&pEpFile->cb File);1100 *pcbSize = ASMAtomicReadU64(&pEpFile->cbEndpoint); 1091 1101 1092 1102 return VINF_SUCCESS; -
trunk/src/VBox/VMM/PDMAsyncCompletionFileCache.cpp
r27526 r27557 1666 1666 1667 1667 AssertMsg( (off >= pEntryNew->Core.Key) 1668 && (off + (RTFOFF) cb <= pEntryNew->Core.Key +pEntryNew->Core.KeyLast + 1),1668 && (off + (RTFOFF)*pcbData <= pEntryNew->Core.KeyLast + 1), 1669 1669 ("Overflow in calculation off=%RTfoff OffsetAligned=%RTfoff\n", 1670 1670 off, pEntryNew->Core.Key)); … … 2166 2166 cbWrite -= cbToWrite; 2167 2167 2168 STAM_COUNTER_INC(&pCache->cMisses);2169 2170 2168 if (pEntryNew) 2171 2169 { 2172 2170 RTFOFF offDiff = off - pEntryNew->Core.Key; 2171 2172 STAM_COUNTER_INC(&pCache->cHits); 2173 2173 2174 2174 /* … … 2209 2209 LogFlow(("Couldn't evict %u bytes from the cache. Remaining request will be passed through\n", cbToWrite)); 2210 2210 2211 STAM_COUNTER_INC(&pCache->cMisses); 2212 2211 2213 pdmacFileEpCacheRequestPassthrough(pEndpoint, pTask, 2212 2214 &IoMemCtx, off, cbToWrite, -
trunk/src/VBox/VMM/PDMAsyncCompletionFileInternal.h
r27299 r27557 518 518 /** File handle. */ 519 519 RTFILE File; 520 /** Size of the underlying file. 521 * Updated while data is appended. */ 520 /** Size of the endpoint. 521 * Updated while data is appended even if it is 522 * only in the cache yet and not written to the file. 523 */ 524 volatile uint64_t cbEndpoint; 525 /** 526 * Real size of the file. Only updated if 527 * data is appended. 528 */ 522 529 volatile uint64_t cbFile; 523 530 /** Flag whether caching is enabled for this file. */
Note:
See TracChangeset
for help on using the changeset viewer.