Nir Soffer has posted comments on this change.

Change subject: core: generify "streamDownloadImage" related methods
......................................................................


Patch Set 3:

(2 comments)

http://gerrit.ovirt.org/#/c/26761/3/vdsm/storage/image.py
File vdsm/storage/image.py:

Line 1170: 
Line 1171:         vol = self._activateVolumeForImportExport(domain, imgUUID, 
volUUID)
Line 1172:         try:
Line 1173:             # Extend the volume (if relevant) to the image size
Line 1174:             vol.extend(imageSharing.getSize(methodArgs) / 
volume.BLOCK_SIZE)
Same bug with block size here - for the same patch Federico suggests.
Line 1175:             imageSharing.download(vol.getVolumePath(), methodArgs)
Line 1176:         finally:
Line 1177:             domain.deactivateImage(imgUUID)
Line 1178: 


Line 1182:         vol = self._activateVolumeForImportExport(domain, imgUUID, 
volUUID)
Line 1183:         try:
Line 1184:             # Extend the volume (if relevant) to the image size
Line 1185:             vol.extend(imageSharing.getLengthFromArgs(methodArgs)
Line 1186:                        / volume.BLOCK_SIZE)
> I just noticed that this is going to truncate the image if it's not a multi
This will create too small image, and dd will fail to write all data.
Line 1187:             imageSharing.copyToImage(vol.getVolumePath(), methodArgs)
Line 1188:         finally:


-- 
To view, visit http://gerrit.ovirt.org/26761
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1c73374681b5a5fc9fd0cb81020138fb5c8bfe69
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Yoav Kleinberger <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to