"""
Returns the stripe unit used for the image.
"""
- ret = self.librbd.rbd_get_stripe_unit()
- return ret.value
+ stripe_unit = c_uint64()
+ ret = self.librbd.rbd_get_stripe_unit(self.image, byref(stripe_unit))
+ if ret != 0:
+ raise make_ex(ret, 'error getting stripe unit for image' % (self.name))
+ return stripe_unit.value
def stripe_count(self):
"""
Returns the stripe count used for the image.
"""
- ret = self.librbd.rbd_get_stripe_count()
- return ret.value
+ stripe_count = c_uint64()
+ ret = self.librbd.rbd_get_stripe_count(self.image, byref(stripe_count))
+ if ret != 0:
+ raise make_ex(ret, 'error getting stripe count for image' % (self.name))
+ return stripe_count.value
def flatten(self):
"""