Changeset 7981 in vbox for trunk/src/VBox/Devices/Storage/VmdkHDDCore.cpp
- Timestamp:
- Apr 15, 2008 12:24:52 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VmdkHDDCore.cpp
r7896 r7981 3728 3728 } 3729 3729 3730 /** @todo implement suppressing of zero data writes (a bit tricky in this3731 * case, as VMDK has no marker for zero blocks). We somehow need to get the3732 * information whether the information in this area is all zeroes as of the3733 * parent image. Then (based on the assumption that parent images are3734 * immutable) the write can be ignored. */3735 3736 3730 /* Handle the write according to the current extent type. */ 3737 3731 switch (pExtent->enmType) … … 3752 3746 { 3753 3747 /* Full block write to a previously unallocated block. 3754 * Allocate GT and find out where to store the grain. */ 3755 rc = vmdkAllocGrain(pImage->pGTCache, pExtent, 3756 uSectorExtentRel, pvBuf, cbToWrite); 3748 * Check if the caller wants to avoid this. */ 3749 if (!(fWrite & VD_WRITE_NO_ALLOC)) 3750 { 3751 /* Allocate GT and find out where to store the grain. */ 3752 rc = vmdkAllocGrain(pImage->pGTCache, pExtent, 3753 uSectorExtentRel, pvBuf, cbToWrite); 3754 } 3755 else 3756 rc = VERR_VDI_BLOCK_FREE; 3757 3757 *pcbPreRead = 0; 3758 3758 *pcbPostRead = 0;
Note:
See TracChangeset
for help on using the changeset viewer.