Changeset 39414 in vbox
- Timestamp:
- Nov 24, 2011 9:52:15 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 75036
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmblkcache.h
r38877 r39414 406 406 VMMR3DECL(int) PDMR3BlkCacheResume(PPDMBLKCACHE pBlkCache); 407 407 408 /** 409 * Clears the block cache and removes all entries. The cache waits until all 410 * I/O transfers completed. 411 * 412 * @returns VBox status code. 413 * @param pBlkCache The cache instance. 414 */ 415 VMMR3DECL(int) PDMR3BlkCacheClear(PPDMBLKCACHE pBlkCache); 416 408 417 /** @} */ 409 418 -
trunk/src/VBox/Devices/Storage/DrvVD.cpp
r38878 r39414 1999 1999 LogFlowFunc(("\n")); 2000 2000 PVBOXDISK pThis = PDMINS_2_DATA(pDrvIns, PVBOXDISK); 2001 2002 if (pThis->pBlkCache) 2003 { 2004 int rc = PDMR3BlkCacheClear(pThis->pBlkCache); 2005 AssertRC(rc); 2006 } 2001 2007 2002 2008 if (pThis->fBootAccelEnabled) -
trunk/src/VBox/VMM/VMMR3/PDMBlkCache.cpp
r39356 r39414 2740 2740 } 2741 2741 2742 VMMR3DECL(int) PDMR3BlkCacheClear(PPDMBLKCACHE pBlkCache) 2743 { 2744 int rc = VINF_SUCCESS; 2745 PPDMBLKCACHEGLOBAL pCache = pBlkCache->pCache; 2746 2747 /* 2748 * Commit all dirty entries now (they are waited on for completion during the 2749 * destruction of the AVL tree below). 2750 * The exception is if the VM was paused because of an I/O error before. 2751 */ 2752 if (!ASMAtomicReadBool(&pCache->fIoErrorVmSuspended)) 2753 pdmBlkCacheCommit(pBlkCache); 2754 2755 /* Make sure nobody is accessing the cache while we delete the tree. */ 2756 pdmBlkCacheLockEnter(pCache); 2757 RTSemRWRequestWrite(pBlkCache->SemRWEntries, RT_INDEFINITE_WAIT); 2758 RTAvlrU64Destroy(pBlkCache->pTree, pdmBlkCacheEntryDestroy, pCache); 2759 RTSemRWReleaseWrite(pBlkCache->SemRWEntries); 2760 2761 pdmBlkCacheLockLeave(pCache); 2762 return rc; 2763 } 2764
Note:
See TracChangeset
for help on using the changeset viewer.