- Timestamp:
- May 7, 2010 2:52:27 PM (15 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r29117 r29218 303 303 " [--teleporterpassword <password>]\n" 304 304 #if 0 305 " [--iomgr simple|async]\n"306 " [--iobackend buffered|unbuffered]\n"307 305 " [--iocache on|off]\n" 308 306 " [--iocachesize <I/O cache size in MB>]\n" -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r29117 r29218 154 154 MODIFYVM_HARDWARE_UUID, 155 155 MODIFYVM_HPET, 156 MODIFYVM_IOMGR,157 MODIFYVM_IOBACKEND,158 156 MODIFYVM_IOCACHE, 159 157 MODIFYVM_IOCACHESIZE, … … 265 263 { "--hardwareuuid", MODIFYVM_HARDWARE_UUID, RTGETOPT_REQ_STRING }, 266 264 { "--hpet", MODIFYVM_HPET, RTGETOPT_REQ_BOOL_ONOFF }, 267 { "--iomgr", MODIFYVM_IOMGR, RTGETOPT_REQ_STRING },268 { "--iobackend", MODIFYVM_IOBACKEND, RTGETOPT_REQ_STRING },269 265 { "--iocache", MODIFYVM_IOCACHE, RTGETOPT_REQ_BOOL_ONOFF }, 270 266 { "--iocachesize", MODIFYVM_IOCACHESIZE, RTGETOPT_REQ_UINT32 }, … … 2010 2006 } 2011 2007 2012 case MODIFYVM_IOMGR:2013 {2014 if (!strcmp(ValueUnion.psz, "simple"))2015 CHECK_ERROR(machine, COMSETTER(IoMgr)(IoMgrType_Simple));2016 else if (!strcmp(ValueUnion.psz, "async"))2017 CHECK_ERROR(machine, COMSETTER(IoMgr)(IoMgrType_Async));2018 else2019 {2020 errorArgument("Invalid --iomgr argument '%s'", ValueUnion.psz);2021 rc = E_FAIL;2022 }2023 break;2024 }2025 2026 case MODIFYVM_IOBACKEND:2027 {2028 if (!strcmp(ValueUnion.psz, "buffered"))2029 CHECK_ERROR(machine, COMSETTER(IoBackend)(IoBackendType_Buffered));2030 else if (!strcmp(ValueUnion.psz, "unbuffered"))2031 CHECK_ERROR(machine, COMSETTER(IoBackend)(IoBackendType_Unbuffered));2032 else2033 {2034 errorArgument("Invalid --iobackend argument '%s'", ValueUnion.psz);2035 rc = E_FAIL;2036 }2037 break;2038 }2039 2040 2008 case MODIFYVM_IOCACHE: 2041 2009 { -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r28835 r29218 554 554 rc = CFGMR3InsertNode(pPDM, "AsyncCompletion", &pPDMAc); RC_CHECK(); 555 555 rc = CFGMR3InsertNode(pPDMAc, "File", &pPDMAcFile); RC_CHECK(); 556 557 /* I/O manager type */558 IoMgrType_T ioMgrType;559 hrc = pMachine->COMGETTER(IoMgr)(&ioMgrType); H();560 if (ioMgrType == IoMgrType_Async)561 rc = CFGMR3InsertString(pPDMAcFile, "IoMgr", "Async");562 else if (ioMgrType == IoMgrType_Simple)563 rc = CFGMR3InsertString(pPDMAcFile, "IoMgr", "Simple");564 else565 rc = VERR_INVALID_PARAMETER;566 RC_CHECK();567 568 /* I/O backend type */569 IoBackendType_T ioBackendType;570 hrc = pMachine->COMGETTER(IoBackend)(&ioBackendType); H();571 if (ioBackendType == IoBackendType_Buffered)572 rc = CFGMR3InsertString(pPDMAcFile, "FileBackend", "Buffered");573 else if (ioBackendType == IoBackendType_Unbuffered)574 rc = CFGMR3InsertString(pPDMAcFile, "FileBackend", "NonBuffered");575 else576 rc = VERR_INVALID_PARAMETER;577 RC_CHECK();578 556 579 557 /* Builtin I/O cache */ -
trunk/src/VBox/Main/MachineImpl.cpp
r29192 r29218 207 207 mCPUAttached[i] = false; 208 208 209 mIoMgrType = IoMgrType_Async;210 mIoBackendType = IoBackendType_Unbuffered;211 209 mIoCacheEnabled = true; 212 210 mIoCacheSize = 5; /* 5MB */ … … 2543 2541 mUserData.backup(); 2544 2542 mUserData->mRTCUseUTC = aEnabled; 2545 2546 return S_OK;2547 }2548 2549 STDMETHODIMP Machine::COMGETTER(IoMgr)(IoMgrType_T *aIoMgrType)2550 {2551 CheckComArgOutPointerValid(aIoMgrType);2552 2553 AutoCaller autoCaller(this);2554 if (FAILED(autoCaller.rc())) return autoCaller.rc();2555 2556 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);2557 2558 *aIoMgrType = mHWData->mIoMgrType;2559 2560 return S_OK;2561 }2562 2563 STDMETHODIMP Machine::COMSETTER(IoMgr)(IoMgrType_T aIoMgrType)2564 {2565 if ( aIoMgrType != IoMgrType_Async2566 && aIoMgrType != IoMgrType_Simple)2567 return E_INVALIDARG;2568 2569 AutoCaller autoCaller(this);2570 if (FAILED(autoCaller.rc())) return autoCaller.rc();2571 2572 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);2573 2574 HRESULT rc = checkStateDependency(MutableStateDep);2575 if (FAILED(rc)) return rc;2576 2577 setModified(IsModified_MachineData);2578 mHWData.backup();2579 mHWData->mIoMgrType = aIoMgrType;2580 2581 return S_OK;2582 }2583 2584 STDMETHODIMP Machine::COMGETTER(IoBackend)(IoBackendType_T *aIoBackendType)2585 {2586 CheckComArgOutPointerValid(aIoBackendType);2587 2588 AutoCaller autoCaller(this);2589 if (FAILED(autoCaller.rc())) return autoCaller.rc();2590 2591 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);2592 2593 *aIoBackendType = mHWData->mIoBackendType;2594 2595 return S_OK;2596 }2597 2598 STDMETHODIMP Machine::COMSETTER(IoBackend)(IoBackendType_T aIoBackendType)2599 {2600 if ( aIoBackendType != IoBackendType_Buffered2601 && aIoBackendType != IoBackendType_Unbuffered)2602 return E_INVALIDARG;2603 2604 AutoCaller autoCaller(this);2605 if (FAILED(autoCaller.rc())) return autoCaller.rc();2606 2607 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);2608 2609 HRESULT rc = checkStateDependency(MutableStateDep);2610 if (FAILED(rc)) return rc;2611 2612 setModified(IsModified_MachineData);2613 mHWData.backup();2614 mHWData->mIoBackendType = aIoBackendType;2615 2543 2616 2544 return S_OK; … … 6907 6835 6908 6836 // IO settings 6909 mHWData->mIoMgrType = data.ioSettings.ioMgrType;6910 mHWData->mIoBackendType = data.ioSettings.ioBackendType;6911 6837 mHWData->mIoCacheEnabled = data.ioSettings.fIoCacheEnabled; 6912 6838 mHWData->mIoCacheSize = data.ioSettings.ulIoCacheSize; … … 7980 7906 7981 7907 // IO settings 7982 data.ioSettings.ioMgrType = mHWData->mIoMgrType;7983 data.ioSettings.ioBackendType = mHWData->mIoBackendType;7984 7908 data.ioSettings.fIoCacheEnabled = !!mHWData->mIoCacheEnabled; 7985 7909 data.ioSettings.ulIoCacheSize = mHWData->mIoCacheSize; -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r29200 r29218 1119 1119 </enum> 1120 1120 1121 <enum1122 name="IoMgrType"1123 uuid="35567419-4d2a-4256-a74e-efcae33493a2"1124 >1125 <desc>1126 Type of the I/O manager used for the image files in a virtual machine if the backend is1127 set to the "Unbuffered" type.1128 </desc>1129 <const name="Simple" value="1">1130 <desc>Simple manager. Normally only used if the default one runs into an1131 error. </desc>1132 </const>1133 <const name="Async" value="2">1134 <desc>Asynchronous manager using the async I/O API on the host if present.1135 This is the default manager.</desc>1136 </const>1137 </enum>1138 1121 1139 1122 <!-- … … 4232 4215 <interface 4233 4216 name="IMachine" extends="$unknown" 4234 uuid=" b8a9324a-1042-4c78-aff6-9d1c2bfd8cd0"4217 uuid="ebea94d0-7663-4dea-8052-00946dd63d11" 4235 4218 wsmap="managed" 4236 4219 > … … 4767 4750 </attribute> 4768 4751 4769 <attribute name="ioMgr" type="IoMgrType">4770 <desc>4771 Selects the I/O manager to use for the virtual machine.4772 </desc>4773 </attribute>4774 4775 <attribute name="ioBackend" type="IoBackendType">4776 <desc>4777 Selects the I/O backend to use for the virtual machine.4778 </desc>4779 </attribute>4780 4781 4752 <attribute name="ioCacheEnabled" type="boolean"> 4782 4753 <desc> -
trunk/src/VBox/Main/include/MachineImpl.h
r28835 r29218 296 296 PointingHidType_T mPointingHidType; 297 297 298 IoMgrType_T mIoMgrType;299 IoBackendType_T mIoBackendType;300 298 BOOL mIoCacheEnabled; 301 299 ULONG mIoCacheSize; … … 444 442 STDMETHOD(COMGETTER(PointingHidType)) (PointingHidType_T *aPointingHidType); 445 443 STDMETHOD(COMSETTER(PointingHidType)) (PointingHidType_T aPointingHidType); 446 STDMETHOD(COMGETTER(IoMgr)) (IoMgrType_T *aIoMgrType);447 STDMETHOD(COMSETTER(IoMgr)) (IoMgrType_T aIoMgrType);448 STDMETHOD(COMGETTER(IoBackend)) (IoBackendType_T *aIoBackendType);449 STDMETHOD(COMSETTER(IoBackend)) (IoBackendType_T aIoBackendType);450 444 STDMETHOD(COMGETTER(IoCacheEnabled)) (BOOL *aEnabled); 451 445 STDMETHOD(COMSETTER(IoCacheEnabled)) (BOOL aEnabled); -
trunk/src/VBox/Main/xml/Settings.cpp
r29116 r29218 1630 1630 IoSettings::IoSettings() 1631 1631 { 1632 ioMgrType = IoMgrType_Async;1633 ioBackendType = IoBackendType_Unbuffered;1634 1632 fIoCacheEnabled = true; 1635 1633 ulIoCacheSize = 5; … … 2514 2512 else if (pelmHwChild->nameEquals("IO")) 2515 2513 { 2516 Utf8Str strTemp;2517 2514 const xml::ElementNode *pelmIoChild; 2518 2515 2519 if ((pelmIoChild = pelmHwChild->findChildElement("IoMgr")))2520 {2521 if (pelmIoChild->getAttributeValue("type", strTemp))2522 {2523 if (strTemp == "Async")2524 hw.ioSettings.ioMgrType = IoMgrType_Async;2525 else if (strTemp == "Simple")2526 hw.ioSettings.ioMgrType = IoMgrType_Simple;2527 else2528 throw ConfigFileError(this, pelmIoChild, N_("Invalid value '%s' in IoMgr/@type attribute"), strTemp.c_str());2529 }2530 }2531 2532 if ((pelmIoChild = pelmHwChild->findChildElement("IoBackend")))2533 {2534 if (pelmIoChild->getAttributeValue("type", strTemp))2535 {2536 if (strTemp == "Unbuffered")2537 hw.ioSettings.ioBackendType = IoBackendType_Unbuffered;2538 else if (strTemp == "Buffered")2539 hw.ioSettings.ioBackendType = IoBackendType_Buffered;2540 else2541 throw ConfigFileError(this, pelmIoChild, N_("Invalid value '%s' in IoBackend/@type attribute"), strTemp.c_str());2542 }2543 }2544 2516 if ((pelmIoChild = pelmHwChild->findChildElement("IoCache"))) 2545 2517 { … … 3553 3525 const char *pcszTemp; 3554 3526 3555 switch (hw.ioSettings.ioMgrType)3556 {3557 case IoMgrType_Simple: pcszTemp = "Simple"; break;3558 case IoMgrType_Async:3559 default:3560 pcszTemp = "Async"; break;3561 }3562 3563 pelmIo->createChild("IoMgr")->setAttribute("type", pcszTemp);3564 3565 switch (hw.ioSettings.ioBackendType)3566 {3567 case IoBackendType_Buffered: pcszTemp = "Buffered"; break;3568 case IoBackendType_Unbuffered:3569 default:3570 pcszTemp = "Unbuffered"; break;3571 }3572 3573 pelmIo->createChild("IoBackend")->setAttribute("type", pcszTemp);3574 3575 3527 pelmIoCache = pelmIo->createChild("IoCache"); 3576 3528 pelmIoCache->setAttribute("enabled", hw.ioSettings.fIoCacheEnabled); … … 4086 4038 if ( hardwareMachine.ioSettings.fIoCacheEnabled != true 4087 4039 || hardwareMachine.ioSettings.ulIoCacheSize != 5 4088 || hardwareMachine.ioSettings.ulIoBandwidthMax != 0 4089 || hardwareMachine.ioSettings.ioMgrType != IoMgrType_Async 4090 || hardwareMachine.ioSettings.ioBackendType != IoBackendType_Unbuffered) 4040 || hardwareMachine.ioSettings.ulIoBandwidthMax != 0) 4091 4041 m->sv = SettingsVersion_v1_10; 4092 4042 }
Note:
See TracChangeset
for help on using the changeset viewer.