Nir Soffer has posted comments on this change. Change subject: vm: Fix extend size calculation ......................................................................
Patch Set 1: (3 comments) http://gerrit.ovirt.org/#/c/37274/1/vdsm/virt/vm.py File vdsm/virt/vm.py: Line 1411: Line 1412: # FIXME: mergeCandidates should be a dictionary of candidate volumes Line 1413: # once libvirt starts reporting watermark information for all volumes. Line 1414: mergeCandidates = {} Line 1415: > unrelated change - even though I like it :) Sure, I will break this prototype to series of clean patches. Line 1416: for drive in self._devices[hwclass.DISK]: Line 1417: if not drive.supportsExtension(): Line 1418: continue Line 1419: Line 1443: # physical from the replica itself. See Line 1444: # https://www.redhat.com/archives/libvir-list/2014-December/ Line 1445: # msg00762.html Line 1446: if not drive.blockDev: Line 1447: replica = drive.diskReplicate > For completeness' sake, same remark as parent patch: how can we make sure t The rule is - if you have a diskReplicate, you are in replicating. Line 1448: res = self.cif.irs.getVolumeSize( Line 1449: replica["domainID"], replica["poolID"], replica["imageID"], Line 1450: replica["volumeID"]) Line 1451: if res['status']['code'] != 0: Line 1446: if not drive.blockDev: Line 1447: replica = drive.diskReplicate Line 1448: res = self.cif.irs.getVolumeSize( Line 1449: replica["domainID"], replica["poolID"], replica["imageID"], Line 1450: replica["volumeID"]) > for my understanding, how costly is this call? This is basically an open() and seek() to end of the file. But we don't have another way to get the current size. Line 1451: if res['status']['code'] != 0: Line 1452: raise VolumeInfoError("Error getting volume info %s" % Line 1453: replica["volumeID"]) Line 1454: physical = int(res['apparentsize']) -- To view, visit http://gerrit.ovirt.org/37274 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7afe3a7f6cfbb47eb76249d3851b7adaf4dbba6f Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Nir Soffer <[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
