- Timestamp:
- Nov 17, 2009 11:02:47 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Config.kmk
r24615 r24746 516 516 endif 517 517 # Enable the new I/O path 518 #if1of ($(KBUILD_TARGET), linux solaris win freebsd darwin)519 #VBOX_WITH_NEW_IO_CODE = 1520 #endif518 if1of ($(KBUILD_TARGET), linux solaris win freebsd darwin) 519 VBOX_WITH_NEW_IO_CODE = 1 520 endif 521 521 522 522 # -
trunk/src/VBox/Devices/Storage/DrvVD.cpp
r24612 r24746 1011 1011 AssertRC(rc); 1012 1012 1013 #ifdef VBOX_WITH_PDM_ASYNC_COMPLETION1014 pThis->VDIAsyncIOCallbacks.cbSize = sizeof(VDINTERFACEASYNCIO);1015 pThis->VDIAsyncIOCallbacks.enmInterface = VDINTERFACETYPE_ASYNCIO;1016 pThis->VDIAsyncIOCallbacks.pfnOpen = drvvdAsyncIOOpen;1017 pThis->VDIAsyncIOCallbacks.pfnClose = drvvdAsyncIOClose;1018 pThis->VDIAsyncIOCallbacks.pfnGetSize = drvvdAsyncIOGetSize;1019 pThis->VDIAsyncIOCallbacks.pfnSetSize = drvvdAsyncIOSetSize;1020 pThis->VDIAsyncIOCallbacks.pfnReadSync = drvvdAsyncIOReadSync;1021 pThis->VDIAsyncIOCallbacks.pfnWriteSync = drvvdAsyncIOWriteSync;1022 pThis->VDIAsyncIOCallbacks.pfnFlushSync = drvvdAsyncIOFlushSync;1023 pThis->VDIAsyncIOCallbacks.pfnReadAsync = drvvdAsyncIOReadAsync;1024 pThis->VDIAsyncIOCallbacks.pfnWriteAsync = drvvdAsyncIOWriteAsync;1025 pThis->VDIAsyncIOCallbacks.pfnFlushAsync = drvvdAsyncIOFlushAsync;1026 1027 rc = VDInterfaceAdd(&pThis->VDIAsyncIO, "DrvVD_AsyncIO", VDINTERFACETYPE_ASYNCIO,1028 &pThis->VDIAsyncIOCallbacks, pThis, &pThis->pVDIfsDisk);1029 AssertRC(rc);1030 #endif1031 1032 1013 /* This is just prepared here, the actual interface is per-image, so it's 1033 1014 * added later. No need to have separate callback tables. */ … … 1049 1030 */ 1050 1031 bool fHostIP = false; 1032 bool fUseNewIo = false; 1051 1033 unsigned iLevel = 0; 1052 1034 PCFGMNODE pCurNode = pCfgHandle; … … 1063 1045 "Format\0Path\0" 1064 1046 "ReadOnly\0TempReadOnly\0HonorZeroWrites\0" 1065 "HostIPStack\0 ");1047 "HostIPStack\0UseNewIo\0"); 1066 1048 } 1067 1049 else … … 1117 1099 break; 1118 1100 } 1101 rc = CFGMR3QueryBoolDef(pCurNode, "UseNewIo", &fUseNewIo, false); 1102 if (RT_FAILURE(rc)) 1103 { 1104 rc = PDMDRV_SET_ERROR(pDrvIns, rc, 1105 N_("DrvVD: Configuration error: Querying \"UseNewIo\" as boolean failed")); 1106 break; 1107 } 1119 1108 } 1120 1109 … … 1168 1157 &pThis->pVDIfsDisk); 1169 1158 } 1159 1160 if (RT_SUCCESS(rc) && fUseNewIo) 1161 { 1162 #ifdef VBOX_WITH_PDM_ASYNC_COMPLETION 1163 pThis->VDIAsyncIOCallbacks.cbSize = sizeof(VDINTERFACEASYNCIO); 1164 pThis->VDIAsyncIOCallbacks.enmInterface = VDINTERFACETYPE_ASYNCIO; 1165 pThis->VDIAsyncIOCallbacks.pfnOpen = drvvdAsyncIOOpen; 1166 pThis->VDIAsyncIOCallbacks.pfnClose = drvvdAsyncIOClose; 1167 pThis->VDIAsyncIOCallbacks.pfnGetSize = drvvdAsyncIOGetSize; 1168 pThis->VDIAsyncIOCallbacks.pfnSetSize = drvvdAsyncIOSetSize; 1169 pThis->VDIAsyncIOCallbacks.pfnReadSync = drvvdAsyncIOReadSync; 1170 pThis->VDIAsyncIOCallbacks.pfnWriteSync = drvvdAsyncIOWriteSync; 1171 pThis->VDIAsyncIOCallbacks.pfnFlushSync = drvvdAsyncIOFlushSync; 1172 pThis->VDIAsyncIOCallbacks.pfnReadAsync = drvvdAsyncIOReadAsync; 1173 pThis->VDIAsyncIOCallbacks.pfnWriteAsync = drvvdAsyncIOWriteAsync; 1174 pThis->VDIAsyncIOCallbacks.pfnFlushAsync = drvvdAsyncIOFlushAsync; 1175 1176 rc = VDInterfaceAdd(&pThis->VDIAsyncIO, "DrvVD_AsyncIO", VDINTERFACETYPE_ASYNCIO, 1177 &pThis->VDIAsyncIOCallbacks, pThis, &pThis->pVDIfsDisk); 1178 #else /* !VBOX_WITH_PDM_ASYNC_COMPLETION */ 1179 rc = PDMDrvHlpVMSetError(pDrvIns, VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES, 1180 RT_SRC_POS, N_("DrvVD: Configuration error: Async Completion Framework not compiled in")); 1181 #endif /* !VBOX_WITH_PDM_ASYNC_COMPLETION */ 1182 } 1183 1170 1184 if (RT_SUCCESS(rc)) 1171 1185 {
Note:
See TracChangeset
for help on using the changeset viewer.