From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=48793 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PN9i6-0001yc-Ax for qemu-devel@nongnu.org; Mon, 29 Nov 2010 14:48:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PN9i4-0000Xo-Sj for qemu-devel@nongnu.org; Mon, 29 Nov 2010 14:48:26 -0500 Received: from mail-fx0-f45.google.com ([209.85.161.45]:53882) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PN9i4-0000XU-IR for qemu-devel@nongnu.org; Mon, 29 Nov 2010 14:48:24 -0500 Received: by fxm12 with SMTP id 12so3849923fxm.4 for ; Mon, 29 Nov 2010 11:48:23 -0800 (PST) Subject: Re: [Qemu-devel] Re: [PATCH] ceph/rbd block driver for qemu-kvm (v8) From: Yehuda Sadeh Weinraub In-Reply-To: <4CF37A23.8010202@redhat.com> References: <20101117214223.GA31321@sir.home> <4CF36B79.4000008@redhat.com> <4CF37A23.8010202@redhat.com> Content-Type: text/plain; charset="UTF-8" Date: Mon, 29 Nov 2010 11:47:34 -0800 Message-ID: <1291060054.1792.88.camel@yehudasa-desktop> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Christian Brunner , Stefan Hajnoczi , ceph-devel@vger.kernel.org, qemu-devel@nongnu.org, kvm@vger.kernel.org On Mon, 2010-11-29 at 11:02 +0100, Kevin Wolf wrote: > Am 29.11.2010 09:59, schrieb Kevin Wolf: > > Am 27.11.2010 08:12, schrieb Stefan Hajnoczi: > >> On Fri, Nov 26, 2010 at 9:59 PM, Christian Brunner > >> wrote: > >>> Thanks for the review. What am I supposed to do now? > >> > >> Kevin is the block maintainer. His review is the next step, I have > >> CCed him. After that rbd would be ready to merge. > > > > If I don't find anything really obvious and it doesn't break the build, > > I'll merge it based on your review. > > Which librados version is this supposed to require? My F12 one seems to > be too old, however configure still automatically enables it (so the > build fails in the default configuration for me). I think you need to > add some check there. > > $ rpm -q ceph-devel > ceph-devel-0.20.2-1.fc12.x86_64 > > $ LANG=C make > CC block/rbd.o > block/rbd.c: In function 'rbd_register_image': > block/rbd.c:191: error: 'CEPH_OSD_TMAP_SET' undeclared (first use in > this function) > block/rbd.c:191: error: (Each undeclared identifier is reported only once > block/rbd.c:191: error: for each function it appears in.) > cc1: warnings being treated as errors > block/rbd.c: In function 'rbd_set_snapc': > block/rbd.c:468: error: implicit declaration of function > 'rados_set_snap_context' > block/rbd.c:468: error: nested extern declaration of > 'rados_set_snap_context' > block/rbd.c: In function 'rbd_snap_create': > block/rbd.c:844: error: implicit declaration of function > 'rados_selfmanaged_snap_create' > block/rbd.c:844: error: nested extern declaration of > 'rados_selfmanaged_snap_create' > make: *** [block/rbd.o] Error 1 > Right. The CEPH_OSD_TMAP_SET can be fixed and in theory we can get it compiled without snapshots, but we're not sure that it is really a good idea at this point. The following patch disables rbd when librados is too old. Thanks, Yehuda -- From: Yehuda Sadeh Date: Mon, 29 Nov 2010 10:38:41 -0800 Subject: [PATCH 1/1] rbd: disable rbd in configure if librados is too old This checks for the existence of the certain function and other definition. Signed-off-by: Yehuda Sadeh --- configure | 27 ++++++++++++++++++++++++--- 1 files changed, 24 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 5d8f620..18ae07c 100755 --- a/configure +++ b/configure @@ -1770,15 +1770,36 @@ int main(void) { rados_initialize(0, NULL); return 0; } EOF rbd_libs="-lrados -lcrypto" if compile_prog "" "$rbd_libs" ; then - rbd=yes - libs_tools="$rbd_libs $libs_tools" - libs_softmmu="$rbd_libs $libs_softmmu" + librados_too_old=no + cat > $TMPC < +#include +#ifndef CEPH_OSD_TMAP_SET +#error missing CEPH_OSD_TMAP_SET +#endif +int main(void) { + int (*func)(const rados_pool_t pool, uint64_t *snapid) = rados_selfmanaged_snap_create; + rados_initialize(0, 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 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 ########################################## -- 1.5.6.5