Adam Litke has posted comments on this change. Change subject: LiveMerge: Sync volume chain information after live merge ......................................................................
Patch Set 5: (5 comments) http://gerrit.ovirt.org/#/c/26636/5/vdsm/storage/hsm.py File vdsm/storage/hsm.py: Line 1783: """ Line 1784: sdDom = sdCache.produce(sdUUID=sdUUID) Line 1785: repoPath = os.path.join(self.storage_repository, sdDom.getPools()[0]) Line 1786: img = image.Image(repoPath) Line 1787: volclass = sdDom.getVolumeClass() > You probably don't need this (volclass). Done Line 1788: Line 1789: imageResourcesNamespace = sd.getNamespace(sdUUID, IMAGE_NAMESPACE) Line 1790: with rmanager.acquireResource(imageResourcesNamespace, imgUUID, Line 1791: rm.LockType.shared): Line 1800: if len(subChain) == 0: Line 1801: return Line 1802: Line 1803: ancestor = subChain[0] Line 1804: successor = subChain[-1] > Not sure if we need these. Consider to remove them (dstParent and children) Done Line 1805: dstParent = volclass(repoPath, sdUUID, imgUUID, Line 1806: ancestor).getParent() Line 1807: children = volclass(repoPath, sdUUID, imgUUID, Line 1808: successor).getChildren() Line 1801: return Line 1802: Line 1803: ancestor = subChain[0] Line 1804: successor = subChain[-1] Line 1805: dstParent = volclass(repoPath, sdUUID, imgUUID, > You probably can use: Done Line 1806: ancestor).getParent() Line 1807: children = volclass(repoPath, sdUUID, imgUUID, Line 1808: successor).getChildren() Line 1809: if children: Line 1804: successor = subChain[-1] Line 1805: dstParent = volclass(repoPath, sdUUID, imgUUID, Line 1806: ancestor).getParent() Line 1807: children = volclass(repoPath, sdUUID, imgUUID, Line 1808: successor).getChildren() > Same here. Done Line 1809: if children: Line 1810: volclass(repoPath, sdUUID, imgUUID, Line 1811: children[0]).setParentMeta(dstParent) Line 1812: Line 1807: children = volclass(repoPath, sdUUID, imgUUID, Line 1808: successor).getChildren() Line 1809: if children: Line 1810: volclass(repoPath, sdUUID, imgUUID, Line 1811: children[0]).setParentMeta(dstParent) here too. Line 1812: Line 1813: @public Line 1814: def mergeSnapshots(self, sdUUID, spUUID, vmUUID, imgUUID, ancestor, Line 1815: successor, postZero=False): -- To view, visit http://gerrit.ovirt.org/26636 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib86c19077695354b45818e0186e642ad0e8bc07c Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Greg Padgett <[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
