Federico Simoncelli has posted comments on this change.

Change subject: image: shrink the new volume When merging block cow volumes
......................................................................


Patch Set 6: (2 inline comments)

Two minor comments.

....................................................
File vdsm/storage/blockVolume.py
Line 310:         closest volume utilization chunk
Line 311:         """
Line 312:         volParams = self.getVolumeParams()
Line 313:         if volParams['volFormat'] == volume.COW_FORMAT:
Line 314:             lvm.activateLVs(self.sdUUID, self.volUUID)
it would be better to use self.prepare() (since it uses the resourceManager and 
has some additional logic)
Line 315:             try:
Line 316:                 check = qemuImg.check(self.getVolumePath(),
Line 317:                                       qemuImg.FORMAT.QCOW2)
Line 318:             finally:


Line 324:             volUtil = int(config.get("irs", 
"volume_utilization_percent"))
Line 325:             finalSize = (volActualSize + volExtendSize * volUtil * 
0.01)
Line 326:             finalSize += volExtendSize - (finalSize % volExtendSize)
Line 327:             self.reduce((finalSize + 511) / 512)
Line 328:             self.log.debug('Shrink qcow volume: %s to : %s bytes',
Generally we log the attempt of doing something, which means that this line 
should precede self.reduce(). If you want to keep logging afterwards you could 
change the message to something like "cow volume %s has been successfully 
shrunk to %s".
Line 329:                            self.volUUID, finalSize)
Line 330: 
Line 331:     @classmethod
Line 332:     def renameVolumeRollback(cls, taskObj, sdUUID, oldUUID, newUUID):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8ace4c48d278cb84ce871bc402643131265c3198
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Eduardo <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Shu Ming <[email protected]>
Gerrit-Reviewer: Yeela Kaplan <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to