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(a)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:
http://libvirt.org/hacking.html#preprocessor
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
header files?
Jan