From: songweibin Date: Mon, 10 Dec 2018 10:13:05 +0000 (+0800) Subject: pybind/rbd: use the correct structure to calculate options size X-Git-Tag: v14.1.0~614^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cf3a8ad277b95daefaabaef88a1123d5e6984e38;p=ceph.git pybind/rbd: use the correct structure to calculate options size Signed-off-by: songweibin --- diff --git a/src/pybind/rbd/rbd.pyx b/src/pybind/rbd/rbd.pyx index 796046ba0cb0..36bb7f37c071 100644 --- a/src/pybind/rbd/rbd.pyx +++ b/src/pybind/rbd/rbd.pyx @@ -2434,7 +2434,7 @@ cdef class ConfigPoolIterator(object): self.num_options = 32 while True: self.options = realloc_chk( - self.options, self.num_options * sizeof(rbd_mirror_peer_t)) + self.options, self.num_options * sizeof(rbd_config_option_t)) with nogil: ret = rbd_config_pool_list(_ioctx, self.options, &self.num_options) if ret < 0: @@ -4763,7 +4763,7 @@ cdef class ConfigImageIterator(object): self.num_options = 32 while True: self.options = realloc_chk( - self.options, self.num_options * sizeof(rbd_mirror_peer_t)) + self.options, self.num_options * sizeof(rbd_config_option_t)) with nogil: ret = rbd_config_image_list(image.image, self.options, &self.num_options)