Skip to contentSkip to conversation

RBD image format in rbd_stat()

DISCUSSION Wido den Hollander 1 participant 1 message May 13, 2013

lore
Share & tools
lore
#0 lore raw

Hi,

While implementing the RADOS/RBD Java bindings for usage in CloudStack I stumbled upon the problem of finding out if a RBD image is format 1 or 2, due to snapshotting and layering.

I found out that rbd_image_t doesn't contain a field "format", and you gave to use rbd_get_old_format() to find out if a image is format 1 or 2.

rbd_stat however also has a size parameter which isn't used right now when looking at the librbd code.

Couldn't a 'format' field be added to rbd_image_t and maintain backwards compatibility by actually looking at the size parameter? That wouldn't break any existing code.

Signature · 5 lines
Wido den Hollander
42on B.V.

Phone: +31 (0)20 700 9902
Skype: contact42on