Change in vdsm[master]: image: shrink the new volume When merging block cow volumes

fsimonce at redhat.com fsimonce at redhat.com
Tue Jul 2 22:05:32 UTC 2013


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 <ykaplan at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Shu Ming <shuming at linux.vnet.ibm.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list