Ayal Baron has posted comments on this change.
Change subject: One shot teardown.
......................................................................
Patch Set 8: (2 inline comments)
....................................................
File vdsm/storage/blockSD.py
Line 1020: Activate all the volumes listed in volUUIDs
Line 1021: """
Line 1022: lvm.activateLVs(self.sdUUID, volUUIDs)
Line 1023:
Line 1024: def deactivateVolumes(self, imgUUID, allVols):
split deactivateVolumes so that you have:
def deactivateImage(self, imgUUID):
allVols = self.getAllVolumes()
self.deactivateImageVolumes(imgUUID, allVols)
Then you avoid the duplicity when needed but also avoid the API spill you currently have
into hsm
Line 1025: """
Line 1026: Deactivate all the volumes belonging to the image.
Line 1027:
Line 1028: imgUUID: the image to be deactivated.
....................................................
File vdsm/storage/hsm.py
Line 3191: """
Line 3192: vars.task.getSharedLock(STORAGE, sdUUID)
Line 3193:
Line 3194: dom = sdCache.produce(sdUUID)
Line 3195: allVols = dom.getAllVolumes()
No, instead of passing the volumes list you can produce it inside deactivateVolumes and
avoid the redundant call here.
Since deactivateVolumes is a noop for file domains then no operation will happen in file
domains (vs. current implementation which calls getAllVolumes redundantly).
Line 3196: # Filter volumes related to this image
Line 3197: dom.deactivateVolumes(imgUUID, allVols)
Line 3198:
Line 3199: @public
--
To view, visit
http://gerrit.ovirt.org/4234
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I4b6a4e99cf3a657affb4f5e96aa1ac1978a297da
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Elad Ben Aharon <eladba1990(a)gmail.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Haim Ateya <hateya(a)redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan(a)redhat.com>