Changeset 31185 in vbox
- Timestamp:
- Jul 28, 2010 8:40:14 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxHDD.h
r31180 r31185 467 467 468 468 /** Open the storage readonly. */ 469 #define VD_INTERFACEASYNCIO_OPEN_FLAGS_READONLY RT_BIT(0)469 #define VD_INTERFACEASYNCIO_OPEN_FLAGS_READONLY RT_BIT(0) 470 470 /** Create the storage backend if it doesn't exist. */ 471 #define VD_INTERFACEASYNCIO_OPEN_FLAGS_CREATE RT_BIT(1) 471 #define VD_INTERFACEASYNCIO_OPEN_FLAGS_CREATE RT_BIT(1) 472 /** Don't write lock the opened file. */ 473 #define VD_INTERFACEASYNCIO_OPEN_FLAGS_DONT_LOCK RT_BIT(2) 472 474 473 475 /** -
trunk/src/VBox/Devices/Storage/DrvVD.cpp
r31180 r31185 348 348 : 0; 349 349 if (pThis->fShareable) 350 { 351 Assert(fFlags & VD_INTERFACEASYNCIO_OPEN_FLAGS_DONT_LOCK); 352 350 353 fFlags |= PDMACEP_FILE_FLAGS_DONT_LOCK; 354 } 351 355 else 352 356 fFlags |= PDMACEP_FILE_FLAGS_CACHING; -
trunk/src/VBox/Devices/Storage/VBoxHDD.cpp
r30863 r31185 1612 1612 /* Set the state to growing. */ 1613 1613 LogFlowFunc(("Disk is growing because of pIoCtx=%#p pIoCtxWrite=%#p\n", 1614 1614 1615 pIoCtx, pIoCtxWrite)); 1615 1616 ASMAtomicWriteBool(&pDisk->fGrowing, true); … … 1824 1825 1825 1826 if (uOpenFlags & VD_INTERFACEASYNCIO_OPEN_FLAGS_READONLY) 1826 fOpen |= RTFILE_O_READ 1827 fOpen |= RTFILE_O_READ | RTFILE_O_DENY_NONE; 1827 1828 else 1828 fOpen |= RTFILE_O_READWRITE | RTFILE_O_DENY_WRITE; 1829 { 1830 fOpen |= RTFILE_O_READWRITE; 1831 1832 if (uOpenFlags & VD_INTERFACEASYNCIO_OPEN_FLAGS_DONT_LOCK) 1833 fOpen |= RTFILE_O_DENY_NONE; 1834 else 1835 fOpen |= RTFILE_O_DENY_WRITE; 1836 } 1829 1837 1830 1838 if (uOpenFlags & VD_INTERFACEASYNCIO_OPEN_FLAGS_CREATE) -
trunk/src/VBox/Devices/Storage/VDIHDDCore.cpp
r31184 r31185 102 102 if (fCreate) 103 103 uOpenFlags |= VD_INTERFACEASYNCIO_OPEN_FLAGS_CREATE; 104 105 if (fShareable) 106 uOpenFlags |= VD_INTERFACEASYNCIO_OPEN_FLAGS_DONT_LOCK; 104 107 105 108 rc = pImage->pInterfaceIOCallbacks->pfnOpen(pImage->pInterfaceIO->pvUser, -
trunk/src/VBox/Devices/Storage/VHDHDDCore.cpp
r31184 r31185 284 284 if (fCreate) 285 285 uOpenFlags |= VD_INTERFACEASYNCIO_OPEN_FLAGS_CREATE; 286 287 if (fShareable) 288 uOpenFlags |= VD_INTERFACEASYNCIO_OPEN_FLAGS_DONT_LOCK; 286 289 287 290 rc = pImage->pInterfaceIOCallbacks->pfnOpen(pImage->pInterfaceIO->pvUser, -
trunk/src/VBox/Devices/Storage/VmdkHDDCore.cpp
r31184 r31185 628 628 if ((fOpen & RTFILE_O_ACTION_MASK) == RTFILE_O_CREATE) 629 629 uOpenFlags |= VD_INTERFACEASYNCIO_OPEN_FLAGS_CREATE; 630 if ((fOpen & RTFILE_O_DENY_MASK) == RTFILE_O_DENY_NONE) 631 uOpenFlags |= VD_INTERFACEASYNCIO_OPEN_FLAGS_DONT_LOCK; 630 632 631 633 rc = pImage->pInterfaceIOCallbacks->pfnOpen(pImage->pInterfaceIO->pvUser, … … 2057 2059 rc = vmdkDescDDBSetU32(pImage, &pImage->Descriptor, 2058 2060 VMDK_DDB_GEO_LCHS_HEADS, 2061 2059 2062 pLCHSGeometry->cHeads); 2060 2063 if (RT_FAILURE(rc)) … … 2257 2260 else 2258 2261 return vmdkError(pImage, VERR_VD_VMDK_INVALID_HEADER, RT_SRC_POS, N_("VMDK: parse error in extent description in '%s'"), pImage->pszFilename); 2262 2259 2263 if (pImage->pExtents[i].enmType == VMDKETYPE_ZERO) 2260 2264 { … … 4066 4070 4067 4071 if (RT_FAILURE(rc)) 4072 4068 4073 goto out; 4069 4074
Note:
See TracChangeset
for help on using the changeset viewer.