Ayal Baron has posted comments on this change.
Change subject: BZ#788640 - Avoid race between several concurrently running merges.
......................................................................
Patch Set 1: I would prefer that you didn't submit this
(2 inline comments)
....................................................
File vdsm/storage/blockVolume.py
Line 549: def getChildrenList(cls, repoPath, sdUUID, imgUUID, pvolUUID):
s/getChildrenList/getImageChildren/ ?
....................................................
File vdsm/storage/image.py
Line 845: childs = volclass.getChildrenList(self.repoPath, sdDom.sdUUID,
imgUUID, volUUID)
while you're at it, please:
s/childs/chList/ as it is in other places in the code.
More importantly though this looks extremely inefficient to me and could generate way too
many lvm commands / globs that go over all files.
In file volume you produce all the volume objects anyway every time so you can build the
entire tree in one shot
In block volume you also get all volumes of the image so again you could build the tree.
So it should be getImageTree(imgUUID)
Then you should just check that it is a chain at merge level and that's it.
--
To view, visit
http://gerrit.ovirt.org/2757
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I9c04b343781c98a852f7de794a32c7db8e863847
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Igor Lvovsky <ilvovsky(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw(a)redhat.com>