Nir Soffer has posted comments on this change.

Change subject: Live Merge: Simplify pivot flow
......................................................................


Patch Set 2:

(2 comments)

Much better, but not clear why do we need the pivot and cleanup modes, which 
can be simplified to single boolean.

http://gerrit.ovirt.org/#/c/31849/2/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 5619:                     if x['volumeID'] in volumes]
Line 5620:         device['volumeChain'] = drive.volumeChain = newChain
Line 5621: 
Line 5622:     def handleBlockJobEvent(self, jobID, drive, mode):
Line 5623:         if mode == LiveMergeCleanupThread.MODE_PIVOT:
Can be simplified by changing mode to boolean:

    if pivot:
       do pivot

    do cleanup

Do we have any reason to keep these two modes?
Line 5624:             # We call imageSyncVolumeChain which will mark the 
current leaf
Line 5625:             # ILLEGAL.  We do this before requesting a pivot so that 
we can
Line 5626:             # properly recover the VM in case we crash.  At this 
point the
Line 5627:             # active layer contains the same data as its parent so 
the ILLEGAL


Line 5688:         self.setDaemon(True)
Line 5689:         self.vm = vm
Line 5690:         self.jobId = jobId
Line 5691:         self.drive = drive
Line 5692:         self.mode = mode
Since we don't have any more modes, this can be simplified to single boolean:

    self.pivot = pivot
Line 5693:         self.success = False
Line 5694: 
Line 5695:     @utils.traceback()
Line 5696:     def run(self):


-- 
To view, visit http://gerrit.ovirt.org/31849
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5e6a9ea7096b5d81f418754d411f135450bf572e
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <[email protected]>
Gerrit-Reviewer: Adam Litke <[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

Reply via email to