Changeset 42071 in vbox for trunk/src/VBox/Devices/Storage
- Timestamp:
- Jul 10, 2012 7:21:50 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DrvVD.cpp
r40282 r42071 2141 2141 bool fUseBlockCache = false; 2142 2142 bool fDiscard = false; 2143 bool fInformAboutZeroBlocks = false; 2143 2144 unsigned iLevel = 0; 2144 2145 PCFGMNODE pCurNode = pCfg; … … 2158 2159 "HostIPStack\0UseNewIo\0BootAcceleration\0BootAccelerationBuffer\0" 2159 2160 "SetupMerge\0MergeSource\0MergeTarget\0BwGroup\0Type\0BlockCache\0" 2160 "CachePath\0CacheFormat\0Discard\0 ");2161 "CachePath\0CacheFormat\0Discard\0InformAboutZeroBlocks\0"); 2161 2162 } 2162 2163 else … … 2291 2292 rc = PDMDRV_SET_ERROR(pDrvIns, VERR_PDM_DRIVER_INVALID_PROPERTIES, 2292 2293 N_("DrvVD: Configuration error: Both \"ReadOnly\" and \"Discard\" are set")); 2294 break; 2295 } 2296 rc = CFGMR3QueryBoolDef(pCurNode, "InformAboutZeroBlocks", &fInformAboutZeroBlocks, false); 2297 if (RT_FAILURE(rc)) 2298 { 2299 rc = PDMDRV_SET_ERROR(pDrvIns, rc, 2300 N_("DrvVD: Configuration error: Querying \"Discard\" as boolean failed")); 2293 2301 break; 2294 2302 } … … 2593 2601 if (fDiscard && iLevel == 0) 2594 2602 uOpenFlags |= VD_OPEN_FLAGS_DISCARD; 2603 if (fInformAboutZeroBlocks) 2604 uOpenFlags |= VD_OPEN_FLAGS_INFORM_ABOUT_ZERO_BLOCKS; 2595 2605 2596 2606 /* Try to open backend in async I/O mode first. */
Note:
See TracChangeset
for help on using the changeset viewer.