Yeela Kaplan has posted comments on this change.

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


Patch Set 3: (6 inline comments)

....................................................
File vdsm/storage/blockVolume.py
Line 303:         """
Line 304:         volParams = self.getVolumeParams()
Line 305:         if volParams['volFormat'] == volume.COW_FORMAT:
Line 306:             lvm.activateLVs(self.sdUUID, self.volUUID)
Line 307:             check = qemuImg.check(self.getVolumePath(), 
qemuImg.FORMAT.QCOW2)
Done
Line 308:             volActualSize = check['offset']
Line 309:             lvm.deactivateLVs(self.sdUUID, self.volUUID)
Line 310:             volBaseSize = int(config.get("irs", 
"volume_utilization_chunk_mb"))
Line 311:             volBaseSize = volBaseSize * constants.MEGAB


Line 306:             lvm.activateLVs(self.sdUUID, self.volUUID)
Line 307:             check = qemuImg.check(self.getVolumePath(), 
qemuImg.FORMAT.QCOW2)
Line 308:             volActualSize = check['offset']
Line 309:             lvm.deactivateLVs(self.sdUUID, self.volUUID)
Line 310:             volBaseSize = int(config.get("irs", 
"volume_utilization_chunk_mb"))
Done
Line 311:             volBaseSize = volBaseSize * constants.MEGAB
Line 312:             volUtil = int(config.get("irs", 
"volume_utilization_percent"))
Line 313:             finalSize = (volActualSize + volBaseSize * volUtil * 0.01)
Line 314:             filler = volBaseSize - (finalSize % volBaseSize)


Line 307:             check = qemuImg.check(self.getVolumePath(), 
qemuImg.FORMAT.QCOW2)
Line 308:             volActualSize = check['offset']
Line 309:             lvm.deactivateLVs(self.sdUUID, self.volUUID)
Line 310:             volBaseSize = int(config.get("irs", 
"volume_utilization_chunk_mb"))
Line 311:             volBaseSize = volBaseSize * constants.MEGAB
Done
Line 312:             volUtil = int(config.get("irs", 
"volume_utilization_percent"))
Line 313:             finalSize = (volActualSize + volBaseSize * volUtil * 0.01)
Line 314:             filler = volBaseSize - (finalSize % volBaseSize)
Line 315:             if filler != volBaseSize:


Line 310:             volBaseSize = int(config.get("irs", 
"volume_utilization_chunk_mb"))
Line 311:             volBaseSize = volBaseSize * constants.MEGAB
Line 312:             volUtil = int(config.get("irs", 
"volume_utilization_percent"))
Line 313:             finalSize = (volActualSize + volBaseSize * volUtil * 0.01)
Line 314:             filler = volBaseSize - (finalSize % volBaseSize)
Done
Line 315:             if filler != volBaseSize:
Line 316:                 finalSize += filler
Line 317:             self.reduce((finalSize + 511) / 512)
Line 318:             self.log.debug('Shrink qcow volume: %s to : %s bytes',


....................................................
File vdsm/storage/image.py
Line 1192:         except Exception:
Line 1193:             self.log.error("Failure to remove subchain %s -> %s in 
image %s", ancestor,
Line 1194:                            successor, imgUUID, exc_info=True)
Line 1195: 
Line 1196:         srcVol.shrinkToOptimalSize()
Done
Line 1197: 


....................................................
File vdsm/storage/lvm.py
Line 1089: 
Line 1090:         raise se.LogicalVolumeExtendError(vgName, lvName, "%sM" % 
(size, ))
Line 1091: 
Line 1092: 
Line 1093: def extendLV(vgName, lvName, size):
I will create an additional patch to take care of this problem
Line 1094:     _resizeLV("lvextend", vgName, lvName, size)
Line 1095: 
Line 1096: 
Line 1097: def reduceLV(vgName, lvName, size):


--
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: 3
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