Source:
protected void endSuccessfully() { if (getDestinationDiskImage() != null) { Guid storagePoolId = getDestinationDiskImage().getStoragePoolId() != null ? getDestinationDiskImage() .getStoragePoolId() : Guid.Empty; setStoragePoolId(storagePoolId); Guid newImageGroupId = getDestinationDiskImage().getId() != null ? getDestinationDiskImage() .getId() : Guid.Empty; Guid newImageId = getDestinationDiskImage().getImageId(); Guid newStorageDomainID = getDestinationDiskImage().getStorageIds().get(0); try { DiskImage newImageIRS = getVolumeInfo(storagePoolId, newStorageDomainID, newImageGroupId, newImageId); if (newImageIRS != null) { completeImageData(newImageIRS); getDestinationDiskImage().getImage().setVolumeType(newImageIRS.getVolumeType()); getDestinationDiskImage().getImage().setVolumeFormat(newImageIRS.getVolumeFormat()); if (getStoragePool().getCompatibilityVersion().greaterOrEquals(Version.v4_1) && newImageIRS.getVolumeFormat().equals(VolumeFormat.COW)) { QemuImageInfo qemuImageInfo = ImagesHandler.getQemuImageInfoFromVdsm(storagePoolId, newStorageDomainID, newImageGroupId, newImageId, true); if (qemuImageInfo != null) { getDestinationDiskImage().getImage().setQcowCompat(qemuImageInfo.getQcowCompat()); } } } } catch (EngineException e) { log.error("Unable to update the image info for image '{}' (image group: '{}') on domain '{}'", newImageId, newImageGroupId, newStorageDomainID); } finally { if (!getParameters().isLeaveLocked()) { getDestinationDiskImage().setImageStatus(ImageStatus.OK); } imageDao.update(getDestinationDiskImage().getImage()); } } if (!getParameters().isLeaveLocked()) { unLockImage(); } setSucceeded(true); }

Target:
protected void endSuccessfully() { if (getDestinationDiskImage() != null) { Guid storagePoolId = getDestinationDiskImage().getStoragePoolId() != null ? getDestinationDiskImage() .getStoragePoolId() : Guid.Empty; setStoragePoolId(storagePoolId); Guid newImageGroupId = getDestinationDiskImage().getId() != null ? getDestinationDiskImage() .getId() : Guid.Empty; Guid newImageId = getDestinationDiskImage().getImageId(); Guid newStorageDomainID = getDestinationDiskImage().getStorageIds().get(0); try { DiskImage newImageIRS = getVolumeInfo(storagePoolId, newStorageDomainID, newImageGroupId, newImageId); if (newImageIRS != null) { completeImageData(newImageIRS); getDestinationDiskImage().getImage().setVolumeType(newImageIRS.getVolumeType()); getDestinationDiskImage().getImage().setVolumeFormat(newImageIRS.getVolumeFormat()); if (FeatureSupported.qcowCompatSupported(getStoragePool().getCompatibilityVersion()) && newImageIRS.getVolumeFormat().equals(VolumeFormat.COW)) { QemuImageInfo qemuImageInfo = ImagesHandler.getQemuImageInfoFromVdsm(storagePoolId, newStorageDomainID, newImageGroupId, newImageId, true); if (qemuImageInfo != null) { getDestinationDiskImage().getImage().setQcowCompat(qemuImageInfo.getQcowCompat()); } } } } catch (EngineException e) { log.error("Unable to update the image info for image '{}' (image group: '{}') on domain '{}'", newImageId, newImageGroupId, newStorageDomainID); } finally { if (!getParameters().isLeaveLocked()) { getDestinationDiskImage().setImageStatus(ImageStatus.OK); } imageDao.update(getDestinationDiskImage().getImage()); } } if (!getParameters().isLeaveLocked()) { unLockImage(); } setSucceeded(true); }