Changeset 24529 in vbox
- Timestamp:
- Nov 9, 2009 11:16:22 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PDMAsyncCompletionFileCache.cpp
r24517 r24529 700 700 "/PDM/AsyncCompletion/File/CacheBuffersReused", 701 701 STAMUNIT_COUNT, "Number of times a buffer could be reused"); 702 STAMR3Register(pClassFile->Core.pVM, &pCache->uAdaptVal, 703 STAMTYPE_U32, STAMVISIBILITY_ALWAYS, 704 "/PDM/AsyncCompletion/File/CacheAdaptValue", 705 STAMUNIT_COUNT, 706 "Adaption value of the cache"); 702 707 #endif 703 708 … … 1218 1223 else 1219 1224 { 1225 if (pEntryBestFit) 1226 pdmacFileEpCacheEntryRelease(pEntryBestFit); 1227 1220 1228 /* 1221 1229 * Align the size to a 4KB boundary. … … 1412 1420 RTSemRWReleaseWrite(pEndpointCache->SemRWEntries); 1413 1421 } 1414 else 1422 else /* Deprecated flag not set */ 1415 1423 { 1416 1424 /* If the entry is dirty it must be also in progress now and we have to defer updating it again. */ … … 1452 1460 STAM_COUNTER_INC(&pEndpointCache->StatWriteDeferred); 1453 1461 } 1454 else 1462 else /* Deprecate buffer */ 1455 1463 { 1456 1464 LogFlow(("Deprecating buffer for entry %#p\n", pEntry)); … … 1492 1500 RTSemRWReleaseWrite(pEndpointCache->SemRWEntries); 1493 1501 } 1494 else 1502 else /* Dirty bit not set */ 1495 1503 { 1496 1504 /* … … 1523 1531 RTSemRWReleaseWrite(pEndpointCache->SemRWEntries); 1524 1532 } 1525 else 1533 else /* I/O in progres flag not set */ 1526 1534 { 1527 1535 /* Write as much as we can into the entry and update the file. */ … … 1543 1551 pdmacFileCacheWriteToEndpoint(pEntry); 1544 1552 } 1545 } 1553 } /* Dirty bit not set */ 1546 1554 1547 1555 /* Move this entry to the top position */ … … 1549 1557 pdmacFileCacheEntryAddToList(&pCache->LruFrequentlyUsed, pEntry); 1550 1558 RTCritSectLeave(&pCache->CritSect); 1551 } 1559 } /* Deprecated flag not set. */ 1552 1560 } 1553 else 1561 else /* Entry is on the ghost list */ 1554 1562 { 1555 1563 uint8_t *pbBuffer = NULL; … … 1599 1607 pdmacFileEpCacheEntryRelease(pEntry); 1600 1608 } 1601 else 1609 else /* No entry found */ 1602 1610 { 1603 1611 /* … … 1620 1628 } 1621 1629 else 1630 { 1631 if (pEntryBestFit) 1632 pdmacFileEpCacheEntryRelease(pEntryBestFit); 1633 1622 1634 cbToWrite = cbWrite; 1635 } 1623 1636 1624 1637 cbWrite -= cbToWrite;
Note:
See TracChangeset
for help on using the changeset viewer.