[libvirt] [PATCH] rbd: Use rbd_create3 to create RBD format 2 images by default
jtomko at redhat.com
Thu Jan 30 13:02:51 UTC 2014
On 12/11/2013 03:47 PM, Wido den Hollander wrote:
> This new RBD format supports snapshotting and cloning. By having
> libvirt create images in format 2 end-users of the created images
> can benefit of the new RBD format.
> Older versions of libvirt can work with this new RBD format as long
> as librbd supports format 2, something that all recent versions of
> librbd do.
How recent? It might be nicer to mention the version number.
Also, the patch no longer applies.
> Signed-off-by: Wido den Hollander <wido at widodh.nl>
> src/storage/storage_backend_rbd.c | 23 +++++++++++++++++++++--
> 1 file changed, 21 insertions(+), 2 deletions(-)
> diff --git a/src/storage/storage_backend_rbd.c b/src/storage/storage_backend_rbd.c
> index 4b6f18c..f3dd7a0 100644
> --- a/src/storage/storage_backend_rbd.c
> +++ b/src/storage/storage_backend_rbd.c
> @@ -435,6 +435,26 @@ cleanup:
> return ret;
> +static int virStorageBackendRBDCreateImage(rados_ioctx_t io,
> + char *name, long capacity)
> + int order = 0;
> + #if LIBRBD_VERSION_CODE > 260
This will fail 'make syntax-check' as it's not indented properly, see:
It would also be easier to read if compared against LIBRBD_VERSION(0, 1, x),
instead of 260.
> + uint64_t features = 3;
> + uint64_t stripe_count = 1;
> + uint64_t stripe_unit = 4194304;
Can these numbers be represented by more descriptive constants from librbd
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: OpenPGP digital signature
More information about the libvir-list