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 <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Eduardo <[email protected]>
Gerrit-Reviewer: Elad Ben Aharon <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Haim Ateya <[email protected]>
Gerrit-Reviewer: Igor Lvovsky <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: Yeela Kaplan <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to