Adam Litke has posted comments on this change. Change subject: storage: Add support for generation to VolumeMetadata ......................................................................
Patch Set 2: (4 comments) https://gerrit.ovirt.org/#/c/64484/2//COMMIT_MSG Commit Message: Line 5: CommitDate: 2016-09-27 15:19:01 -0400 Line 6: Line 7: storage: Add support for generation to VolumeMetadata Line 8: Line 9: We would like to add support for a new generation id key in the volume > remove id. Done Line 10: metadata. GEN is a monotonically increasing integer that can be used Line 11: to determine whether certain operations have been completed on a volume Line 12: and to prevent two hosts from sequentially performing the same operation Line 13: in the event of double scheduling. https://gerrit.ovirt.org/#/c/64484/2/lib/vdsm/storage/constants.py File lib/vdsm/storage/constants.py: Line 161 Line 162 Line 163 Line 164 Line 165 > Lets separate DESCRIPTION_SIZE from the generation constants, and maybe add Done Line 124: IMAGE = "IMAGE" Line 125: DESCRIPTION = "DESCRIPTION" Line 126: LEGALITY = "LEGALITY" Line 127: MTIME = "MTIME" Line 128: GENERATION = "GEN" > Lets add a comment: Done Line 129: POOL = MDK_POOLS # Deprecated Line 130: Line 131: # In block storage, metadata size is limited to BLOCK_SIZE (512), to Line 132: # ensure that metadata is written atomically. This is big enough for the https://gerrit.ovirt.org/#/c/64484/2/tests/storage_volume_metadata_test.py File tests/storage_volume_metadata_test.py: Line 188: Line 189: def test_generation_default(self): Line 190: data = make_md_dict() Line 191: lines = make_lines(generation=sc.DEFAULT_GENERATION + 1, **data) Line 192: lines.remove("{}={}".format(sc.GENERATION, sc.DEFAULT_GENERATION + 1)) > Why not: Simplified. Line 193: md = volume.VolumeMetadata.from_lines(lines) -- To view, visit https://gerrit.ovirt.org/64484 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icb71e1fc78f6c1e411e725b26c48411ffd04d0b6 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: gerrit-hooks <[email protected]> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list -- [email protected] To unsubscribe send an email to [email protected]
