Change in vdsm[master]: gluster: Get size information of a gluster volume.
dnarayan at redhat.com
dnarayan at redhat.com
Fri Jun 13 18:01:37 UTC 2014
Darshan N has posted comments on this change.
Change subject: gluster: Get size information of a gluster volume.
......................................................................
Patch Set 5:
(6 comments)
http://gerrit.ovirt.org/#/c/28581/5/vdsm/gluster/gfapi.py
File vdsm/gluster/gfapi.py:
Line 56: global _api
Line 57: if not _api:
Line 58: _api = ctypes.CDLL(find_library("gfapi"),
Line 59: ctypes.RTLD_GLOBAL,
Line 60: use_errno=True)
> I think _lib would be a better name for it. I would either:
Done
Line 61: return
Line 62:
Line 63:
Line 64: def glfsInit(volumeId, host, port, protocol):
Line 63:
Line 64: def glfsInit(volumeId, host, port, protocol):
Line 65: _glfs_new = ctypes.CFUNCTYPE(
Line 66: ctypes.c_void_p, ctypes.c_char_p)(('glfs_new', _api))
Line 67: fs = _glfs_new(volumeId)
> You'll be wrapping the C method on each volumeStatvfs. Please, consider mov
Done
Line 68:
Line 69: _glfs_set_volfile_server = ctypes.CFUNCTYPE(
Line 70: ctypes.c_int,
Line 71: ctypes.c_void_p,
Line 70: ctypes.c_int,
Line 71: ctypes.c_void_p,
Line 72: ctypes.c_char_p,
Line 73: ctypes.c_char_p,
Line 74: ctypes.c_int)(('glfs_set_volfile_server', _api))
> You'll be wrapping the C method on each volumeStatvfs. Please, consider mov
Done
Line 75: rc = _glfs_set_volfile_server(fs,
Line 76: protocol,
Line 77: host,
Line 78: port)
Line 81: rc=rc, err=["setting volfile server failed"]
Line 82: )
Line 83:
Line 84: _glfs_init = ctypes.CFUNCTYPE(
Line 85: ctypes.c_int, ctypes.c_void_p)(('glfs_init', _api))
> You'll be wrapping the C method on each volumeStatvfs. Please, consider mov
Done
Line 86: rc = _glfs_init(fs)
Line 87: if rc == 0:
Line 88: return fs
Line 89: elif rc == 1:
Line 99:
Line 100:
Line 101: def glfsFini(fs, volumeId):
Line 102: _glfs_fini = ctypes.CFUNCTYPE(
Line 103: ctypes.c_int, ctypes.c_void_p)(('glfs_fini', _api))
> You'll be wrapping the C method on each volumeStatvfs. Please, consider mov
Done
Line 104: rc = _glfs_fini(fs)
Line 105: if rc != 0:
Line 106: raise ge.GlfsFiniException(rc=rc)
Line 107:
Line 118: # Define return type and argtypes of glfs_statvfs
Line 119: _glfs_statvfs = ctypes.CFUNCTYPE(ctypes.c_int,
Line 120: ctypes.c_void_p,
Line 121: ctypes.c_char_p,
Line 122: ctypes.c_void_p)(('glfs_statvfs', _api))
> You'll be wrapping the C method on each volumeStatvfs. Please, consider mov
Done
Line 123:
Line 124: rc = _glfs_statvfs(fs, GLUSTER_VOL_PATH, ctypes.byref(statvfsdata))
Line 125: if rc != 0:
Line 126: raise ge.GlfsStatvfsException(rc=rc)
--
To view, visit http://gerrit.ovirt.org/28581
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If5d622738ae955eb4002f56fc73adb4f07f0b857
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Darshan N <dnarayan at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Aravinda VK <avishwan at redhat.com>
Gerrit-Reviewer: Bala.FA <barumuga at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Darshan N <dnarayan at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeyasin at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list