Changeset 96842 in vbox for trunk/src/VBox/Storage/VMDK.cpp
- Timestamp:
- Sep 23, 2022 10:08:09 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/VMDK.cpp
r96837 r96842 2820 2820 } 2821 2821 /** 2822 * Internal: allocate and describes an additional, file-backed extent 2822 * Internal: allocate and describes an additional, file-backed extent 2823 2823 * for the given size. Preserves original extents. 2824 2824 */ … … 2846 2846 pExtent->enmAccess = VMDKACCESS_READWRITE; 2847 2847 pExtent->uSectorOffset = 0; 2848 2848 2849 2849 char *pszBasenameSubstr = RTPathFilename(pImage->pszFilename); 2850 2850 AssertPtr(pszBasenameSubstr); … … 7520 7520 return VERR_BUFFER_OVERFLOW; 7521 7521 } 7522 7522 7523 7523 char * szNewExtentSectors = (char *)RTMemAlloc(UINT64_MAX_BUFF_SIZE); 7524 7524 if (!szNewExtentSectors) … … 7563 7563 { 7564 7564 RT_NOREF5(uPercentStart, uPercentSpan, pVDIfsDisk, pVDIfsImage, pVDIfsOperation); 7565 7565 7566 7566 // Establish variables and objects needed 7567 7567 int rc = VINF_SUCCESS; … … 7594 7594 else if (cbSize > pImage->cbSize) 7595 7595 { 7596 /** 7596 /** 7597 7597 * monolithicFlat. FIXED flag and not split up into 2 GB parts. 7598 7598 */ … … 7614 7614 } 7615 7615 7616 /** 7617 * twoGbMaxExtentFlat. FIXED flag and SPLIT into 2 GB parts. 7616 /** 7617 * twoGbMaxExtentFlat. FIXED flag and SPLIT into 2 GB parts. 7618 7618 */ 7619 7619 if ((uImageFlags & VD_IMAGE_FLAGS_FIXED) && (uImageFlags & VD_VMDK_IMAGE_FLAGS_SPLIT_2G)) … … 7634 7634 if (RT_FAILURE(rc)) 7635 7635 return vdIfError(pImage->pIfError, rc, RT_SRC_POS, N_("VMDK: could not set size of new file '%s'"), pExtent->pszFullname); 7636 7636 7637 7637 rc = vmdkRepaceExtentSize(pImage, pImage->Descriptor.uFirstExtent + cExtents - 1, 7638 7638 pExtent->cNominalSectors, cSectorsNeeded + cLastExtentRemSectors); … … 7652 7652 7653 7653 cSectorsNeeded = cSectorsNeeded - VMDK_BYTE2SECTOR(VMDK_2G_SPLIT_SIZE) + cLastExtentRemSectors; 7654 7654 7655 7655 rc = vmdkRepaceExtentSize(pImage, pImage->Descriptor.uFirstExtent + cExtents - 1, 7656 7656 pExtent->cNominalSectors, VMDK_BYTE2SECTOR(VMDK_2G_SPLIT_SIZE));
Note:
See TracChangeset
for help on using the changeset viewer.