Changeset 29497 in vbox for trunk/src/VBox/Devices
- Timestamp:
- May 14, 2010 7:45:44 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VBoxHDD.cpp
r29413 r29497 1459 1459 pTmp, 1, 1460 1460 pIoCtx, cbThisWrite, 1461 pTmp, 1461 pTmp, 1462 1462 (pImage->uOpenFlags & VD_OPEN_FLAGS_HONOR_SAME) 1463 1463 ? vdWriteHelperStandardAsync … … 1840 1840 if (RT_FAILURE(pIoCtx->rcReq)) 1841 1841 ASMAtomicCmpXchgS32(&pIoCtxParent->rcReq, pIoCtx->rcReq, VINF_SUCCESS); 1842 1842 1843 1843 /* 1844 1844 * A completed child write means that we finsihed growing the image. … … 3937 3937 3938 3938 RTUUID ImageUuid, ImageModificationUuid; 3939 RTUUID ParentUuid, ParentModificationUuid;3940 3939 if (pDiskFrom != pDiskTo) 3941 3940 { … … 3954 3953 if (RT_FAILURE(rc)) 3955 3954 RTUuidClear(&ImageModificationUuid); 3956 rc = pImageFrom->Backend->pfnGetParentUuid(pImageFrom->pvBackendData, &ParentUuid);3957 if (RT_FAILURE(rc))3958 RTUuidClear(&ParentUuid);3959 rc = pImageFrom->Backend->pfnGetParentModificationUuid(pImageFrom->pvBackendData, &ParentModificationUuid);3960 if (RT_FAILURE(rc))3961 RTUuidClear(&ParentModificationUuid);3962 3955 3963 3956 char szComment[1024]; … … 3975 3968 fLockReadFrom = false; 3976 3969 3970 rc2 = vdThreadStartRead(pDiskTo); 3971 AssertRC(rc2); 3972 unsigned cImagesTo = pDiskTo->cImages; 3973 rc2 = vdThreadFinishRead(pDiskTo); 3974 AssertRC(rc2); 3975 3977 3976 if (pszFilename) 3978 3977 { … … 3980 3979 cbSize = cbSizeFrom; 3981 3980 3982 /* Create destination image with the properties of thesource image. */3981 /* Create destination image with the properties of source image. */ 3983 3982 /** @todo replace the VDCreateDiff/VDCreateBase calls by direct 3984 3983 * calls to the backend. Unifies the code and reduces the API 3985 3984 * dependencies. Would also make the synchronization explicit. */ 3986 if ( uImageFlags & VD_IMAGE_FLAGS_DIFF)3985 if (cImagesTo > 0) 3987 3986 { 3988 rc = VDCreateDiff(pDiskTo, pszBackend, pszFilename, uImageFlags, 3989 szComment, &ImageUuid, &ParentUuid, uOpenFlagsFrom & ~VD_OPEN_FLAGS_READONLY, NULL, NULL); 3987 rc = VDCreateDiff(pDiskTo, pszBackend, pszFilename, 3988 uImageFlags, szComment, &ImageUuid, 3989 NULL /* pParentUuid */, 3990 uOpenFlagsFrom & ~VD_OPEN_FLAGS_READONLY, 3991 NULL, NULL); 3990 3992 3991 3993 rc2 = vdThreadStartWrite(pDiskTo); … … 4024 4026 if (RT_SUCCESS(rc) && !RTUuidIsNull(&ImageUuid)) 4025 4027 pDiskTo->pLast->Backend->pfnSetUuid(pDiskTo->pLast->pvBackendData, &ImageUuid); 4026 if (RT_SUCCESS(rc) && !RTUuidIsNull(&ParentUuid))4027 pDiskTo->pLast->Backend->pfnSetParentUuid(pDiskTo->pLast->pvBackendData, &ParentUuid);4028 4028 } 4029 4029 if (RT_FAILURE(rc)) … … 4138 4138 if (!RTUuidIsNull(&ImageModificationUuid)) 4139 4139 pImageTo->Backend->pfnSetModificationUuid(pImageTo->pvBackendData, &ImageModificationUuid); 4140 /** @todo double-check this - it makes little sense to copy over the parent modification uuid,4141 * as the destination image can have a totally different parent. */4142 #if 04143 pImageTo->Backend->pfnSetParentModificationUuid(pImageTo->pvBackendData, &ParentModificationUuid);4144 #endif4145 4140 } 4146 4141 } while (0);
Note:
See TracChangeset
for help on using the changeset viewer.