summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJosh Durgin <josh.durgin@dreamhost.com>2011-05-26 16:07:31 -0700
committerKevin Wolf <kwolf@redhat.com>2011-06-08 11:56:39 +0200
commitad32e9c003647142d08dfce450eafa0ab7887d10 (patch)
tree7a76c4c2ae6a34e5e4d2c27721d4014685fa5c3d /configure
parentd1f6fd8d1400ab356aee776b1ecc3ed1e89dbeaa (diff)
downloadqemu-ad32e9c003647142d08dfce450eafa0ab7887d10.tar.gz
rbd: use the higher level librbd instead of just librados
librbd stacks on top of librados to provide access to rbd images. Using librbd simplifies the qemu code, and allows qemu to use new versions of the rbd format with few (if any) changes. Reviewed-by: Christian Brunner <chb@muc.de> Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com> Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure33
1 files changed, 8 insertions, 25 deletions
diff --git a/configure b/configure
index d38b952c86..bdacb49226 100755
--- a/configure
+++ b/configure
@@ -1917,41 +1917,24 @@ fi
if test "$rbd" != "no" ; then
cat > $TMPC <<EOF
#include <stdio.h>
-#include <rados/librados.h>
-int main(void) { rados_initialize(0, NULL); return 0; }
-EOF
- rbd_libs="-lrados"
- if compile_prog "" "$rbd_libs" ; then
- librados_too_old=no
- cat > $TMPC <<EOF
-#include <stdio.h>
-#include <rados/librados.h>
-#ifndef CEPH_OSD_TMAP_SET
-#error missing CEPH_OSD_TMAP_SET
-#endif
+#include <rbd/librbd.h>
int main(void) {
- int (*func)(const rados_pool_t pool, uint64_t *snapid) = rados_selfmanaged_snap_create;
- rados_initialize(0, NULL);
+ rados_t cluster;
+ rados_create(&cluster, NULL);
return 0;
}
EOF
- if compile_prog "" "$rbd_libs" ; then
- rbd=yes
- libs_tools="$rbd_libs $libs_tools"
- libs_softmmu="$rbd_libs $libs_softmmu"
- else
- rbd=no
- librados_too_old=yes
- fi
+ rbd_libs="-lrbd -lrados"
+ if compile_prog "" "$rbd_libs" ; then
+ rbd=yes
+ libs_tools="$rbd_libs $libs_tools"
+ libs_softmmu="$rbd_libs $libs_softmmu"
else
if test "$rbd" = "yes" ; then
feature_not_found "rados block device"
fi
rbd=no
fi
- if test "$librados_too_old" = "yes" ; then
- echo "-> Your librados version is too old - upgrade needed to have rbd support"
- fi
fi
##########################################