Changeset 29587 in vbox for trunk/src/VBox/VMM
- Timestamp:
- May 17, 2010 9:42:26 PM (15 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PDMAsyncCompletionFile.cpp
r29450 r29587 912 912 static int pdmacFileEpClose(PPDMASYNCCOMPLETIONENDPOINT pEndpoint) 913 913 { 914 int rc = VINF_SUCCESS; 914 915 PPDMASYNCCOMPLETIONENDPOINTFILE pEpFile = (PPDMASYNCCOMPLETIONENDPOINTFILE)pEndpoint; 915 916 PPDMASYNCCOMPLETIONEPCLASSFILE pEpClassFile = (PPDMASYNCCOMPLETIONEPCLASSFILE)pEndpoint->pEpClass; 916 917 918 /* Free the cached data. */ 919 if (pEpFile->fCaching) 920 { 921 rc = pdmacFileEpCacheFlush(pEpFile); 922 AssertRC(rc); 923 pdmacFileEpCacheDestroy(pEpFile); 924 } 925 917 926 /* Make sure that all tasks finished for this endpoint. */ 918 intrc = pdmacFileAioMgrCloseEndpoint(pEpFile->pAioMgr, pEpFile);927 rc = pdmacFileAioMgrCloseEndpoint(pEpFile->pAioMgr, pEpFile); 919 928 AssertRC(rc); 920 929 … … 940 949 } 941 950 942 /* Free the cached data. */943 if (pEpFile->fCaching)944 pdmacFileEpCacheDestroy(pEpFile);945 946 951 /* Remove from the bandwidth manager */ 947 952 pdmacFileBwUnref(pEpFile->pBwMgr); … … 1032 1037 if (pEpFile->fCaching) 1033 1038 { 1034 int rc = pdmacFileEpCacheFlush(pEpFile , pTaskFile);1039 int rc = pdmacFileEpCacheFlush(pEpFile); 1035 1040 AssertRC(rc); 1036 1041 } -
trunk/src/VBox/VMM/PDMAsyncCompletionFileCache.cpp
r29250 r29587 1144 1144 while (ASMAtomicReadU32(&pEntry->fFlags) & (PDMACFILECACHE_ENTRY_IO_IN_PROGRESS | PDMACFILECACHE_ENTRY_IS_DIRTY)) 1145 1145 { 1146 /* Leave the locks to let the I/O thread make progress but reference the entry to prevent eviction. */ 1147 pdmacFileEpCacheEntryRef(pEntry); 1146 1148 RTSemRWReleaseWrite(pEndpointCache->SemRWEntries); 1149 pdmacFileCacheLockLeave(pCache); 1150 1147 1151 RTThreadSleep(250); 1152 1153 /* Re-enter all locks */ 1154 pdmacFileCacheLockEnter(pCache); 1148 1155 RTSemRWRequestWrite(pEndpointCache->SemRWEntries, RT_INDEFINITE_WAIT); 1156 pdmacFileEpCacheEntryRelease(pEntry); 1149 1157 } 1150 1158 … … 2175 2183 } 2176 2184 2177 int pdmacFileEpCacheFlush(PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint , PPDMASYNCCOMPLETIONTASKFILE pTask)2185 int pdmacFileEpCacheFlush(PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint) 2178 2186 { 2179 2187 int rc = VINF_SUCCESS; 2180 2188 2181 LogFlowFunc((": pEndpoint=%#p{%s} pTask=%#p\n", 2182 pEndpoint, pEndpoint->Core.pszUri, pTask)); 2189 LogFlowFunc((": pEndpoint=%#p{%s}\n", pEndpoint, pEndpoint->Core.pszUri)); 2183 2190 2184 2191 /* Commit dirty entries in the cache. */ -
trunk/src/VBox/VMM/PDMAsyncCompletionFileInternal.h
r29466 r29587 727 727 RTFOFF off, PCRTSGSEG paSegments, size_t cSegments, 728 728 size_t cbWrite); 729 int pdmacFileEpCacheFlush(PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint , PPDMASYNCCOMPLETIONTASKFILE pTask);729 int pdmacFileEpCacheFlush(PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint); 730 730 731 731 RT_C_DECLS_END
Note:
See TracChangeset
for help on using the changeset viewer.