Change in vdsm[master]: lvm: Use a constant to define default vg extent size
alitke at redhat.com
alitke at redhat.com
Thu Apr 28 14:12:59 UTC 2016
Adam Litke has posted comments on this change.
Change subject: lvm: Use a constant to define default vg extent size
......................................................................
Patch Set 1:
(3 comments)
https://gerrit.ovirt.org/#/c/56715/1/lib/vdsm/storage/constants.py
File lib/vdsm/storage/constants.py:
Line 21: from __future__ import absolute_import
Line 22:
Line 23: STORAGE = "Storage"
Line 24: SECTOR_SIZE = 512
Line 25: DEFAULT_VG_EXTENT_SIZE_MB = 128
> Why DEFAULT? this is the only value we use. I think that "VG_EXTENT_SIZE_MB
Done
Line 26:
Line 27: FILE_VOLUME_PERMISSIONS = 0o660
Line 28: LEASE_FILEEXT = ".lease"
Line 29:
https://gerrit.ovirt.org/#/c/56715/1/vdsm/storage/lvm.py
File vdsm/storage/lvm.py:
Line 929: #
Line 930: # Public Volume Group interface
Line 931: #
Line 932:
Line 933: def createVG(vgName, devices, initialTag, metadataSize, extentsize=None,
> None!?
Actually, no one is using this parameter so I am going to remove it and just use the constant in the code below.
Line 934: force=False):
Line 935: pvs = [_fqpvname(pdev) for pdev in _normalizeargs(devices)]
Line 936: _checkpvsblksize(pvs)
Line 937:
Line 943: if rc != 0:
Line 944: raise se.PhysDevInitializationError(pvs[0])
Line 945:
Line 946: if extentsize is None:
Line 947: extentsize = "%rm" % DEFAULT_VG_EXTENT_SIZE_MB
> We must accept only integer in megabytes or bytes. Accepting strings for nu
I am just going to use the constant here.
Line 948: options = ["--physicalextentsize", extentsize]
Line 949: if initialTag:
Line 950: options.extend(("--addtag", initialTag))
Line 951: cmd = ["vgcreate"] + options + [vgName] + pvs
--
To view, visit https://gerrit.ovirt.org/56715
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I77d76e9c1011cb3bba41decbcb06830eaed66a6a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list