Changeset 23959 in vbox
- Timestamp:
- Oct 22, 2009 8:38:31 AM (15 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PDMAsyncCompletionFile.cpp
r23958 r23959 555 555 PPDMASYNCCOMPLETIONENDPOINTFILE pEpFile = (PPDMASYNCCOMPLETIONENDPOINTFILE)pEndpoint; 556 556 PPDMASYNCCOMPLETIONEPCLASSFILE pEpClassFile = (PPDMASYNCCOMPLETIONEPCLASSFILE)pEndpoint->pEpClass; 557 bool fUseFailsafeManager = pEpClassFile->fFailsafe; 557 558 558 559 AssertMsgReturn((fFlags & ~(PDMACEP_FILE_FLAGS_READ_ONLY | PDMACEP_FILE_FLAGS_CACHING)) == 0, … … 610 611 * 611 612 * On Linux we have the same problem with cifs. 612 * Shouldn't be a big problem here either because 613 * it's a network filesystem and the data is on another 614 * computer. 613 * Have to disable async I/O here too because it requires O_DIRECT. 615 614 */ 616 615 fFileFlags &= ~RTFILE_O_NO_CACHE; 616 617 #ifdef RT_OS_LINUX 618 fFileFlags &= ~RTFILE_O_ASYNC_IO; 619 fUseFailsafeManager = true; 620 #endif 617 621 618 622 /* Open again. */ … … 644 648 pEpFile->cTasksCached = 0; 645 649 646 if ( pEpClassFile->fFailsafe)650 if (fUseFailsafeManager) 647 651 { 648 652 /* Safe mode. Every file has its own async I/O manager. */ 649 rc = pdmacFileAioMgrCreate(pEpClassFile, &pAioMgr, false);653 rc = pdmacFileAioMgrCreate(pEpClassFile, &pAioMgr, true); 650 654 AssertRC(rc); 651 655 } -
trunk/src/VBox/VMM/PDMAsyncCompletionFileNormal.cpp
r23956 r23959 880 880 PPDMACEPFILEMGR pAioMgrFailsafe; 881 881 882 LogRel(("%s: Request %#p failed with rc=%Rrc, migrating endpoint %s to failsafe manager.\n", 883 RTThreadGetName(pAioMgr->Thread), pTask, rcReq, pEndpoint->Core.pszUri)); 884 882 885 pEndpoint->AioMgr.fMoving = true; 883 886 … … 887 890 888 891 pEndpoint->AioMgr.pAioMgrDst = pAioMgrFailsafe; 892 893 /* Update the flags to open the file with. Disable async I/O and enable the host cache. */ 894 pEndpoint->fFlags &= ~(RTFILE_O_ASYNC_IO | RTFILE_O_NO_CACHE); 889 895 } 890 896 … … 974 980 else if (RT_UNLIKELY(!pEndpoint->AioMgr.cRequestsActive && pEndpoint->AioMgr.fMoving)) 975 981 { 976 /* If wethe endpoint is about to be migrated do it now. */982 /* If the endpoint is about to be migrated do it now. */ 977 983 bool fReqsPending = pdmacFileAioMgrNormalRemoveEndpoint(pEndpoint); 978 984 Assert(!fReqsPending);
Note:
See TracChangeset
for help on using the changeset viewer.