Adam Litke has posted comments on this change.

Change subject: storage: Increment generation id when completing operation
......................................................................


Patch Set 2:

(2 comments)

https://gerrit.ovirt.org/#/c/64487/2/tests/storage_volume_test.py
File tests/storage_volume_test.py:

Line 170:             vol.setMetaParam(sc.GENERATION, generation)
Line 171:             self.assertEqual(generation, vol.getInfo()['generation'])
Line 172: 
Line 173:     @permutations((
Line 174:         (sc.MAX_GENERATION, 0),
> I think we need only this test for wrapping, previous test verified increas
Keeping first two as they catch off by one errors.
Line 175:         (sc.MAX_GENERATION - 1, sc.MAX_GENERATION),
Line 176:         (0, 1),
Line 177:         (1, 2),
Line 178:     ))


https://gerrit.ovirt.org/#/c/64487/2/vdsm/storage/volume.py
File vdsm/storage/volume.py:

Line 55:     # domains) we do not need to use the image dir reference anymore.
Line 56:     return volUUID
Line 57: 
Line 58: 
Line 59: def next_generation(current_generation):
> Do we need it public?
no.  Making private.
Line 60:     # Increment a generation value and wrap to 0 after MAX_GENERATION
Line 61:     return (current_generation + 1) % (sc.MAX_GENERATION + 1)
Line 62: 
Line 63: 


-- 
To view, visit https://gerrit.ovirt.org/64487
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic9a62289378b11c3b2f2f520c894336fc89c1fdc
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <ali...@redhat.com>
Gerrit-Reviewer: Adam Litke <ali...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org

Reply via email to