From patchwork Mon Nov 29 19:47:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yehuda Sadeh Weinraub X-Patchwork-Id: 73488 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C333BB70F1 for ; Tue, 30 Nov 2010 06:49:52 +1100 (EST) Received: from localhost ([127.0.0.1]:34663 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PN9jR-0002P6-7k for incoming@patchwork.ozlabs.org; Mon, 29 Nov 2010 14:49:49 -0500 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=wwjDN7Ry0ui7OqPZb7DyI4Re1sXMgeyg/7KkfJK5tco=; b=TvK2/rkcSLXIo5MAKdHWAc22JQUOcf5nhZlQySxkD5PB8tCUbTt/LE9yxlE+PdHRVN RW16daTdpfgH7dIyABb0p3pkf0Rlz8a6TJfsTjcEV6JsEa0XUqaW4bgoqpoHJ4PuY2QV n9lXqaJ2HlCwbCBh0LvRi4HsX8yWvkFXc+aAY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=eRtJ6Coi7INuCbVevVjgXIXxHRCQqSGogR/oUWeUQ2DWhK3zRVigPkRu6h1BuaGbAj cF9LnGV886Cd6Fo1P07o+dYrf/DkhDA4mvHrPKntZHes5vbjhNvtLVtsEBclB8VeLJYV pr3ojQe2L1im2CMgTZ2DouyKrN2GO+1RnSd3g= Received: by 10.223.74.143 with SMTP id u15mr5741209faj.27.1291060102997; Mon, 29 Nov 2010 11:48:22 -0800 (PST) Received: from [10.0.1.20] (ip-66-33-206-8.dreamhost.com [66.33.206.8]) by mx.google.com with ESMTPS id f24sm780567fak.24.2010.11.29.11.48.20 (version=SSLv3 cipher=RC4-MD5); Mon, 29 Nov 2010 11:48:21 -0800 (PST) Subject: Re: [Qemu-devel] Re: [PATCH] ceph/rbd block driver for qemu-kvm (v8) From: Yehuda Sadeh Weinraub To: Kevin Wolf In-Reply-To: <4CF37A23.8010202@redhat.com> References: <20101117214223.GA31321@sir.home> <4CF36B79.4000008@redhat.com> <4CF37A23.8010202@redhat.com> Date: Mon, 29 Nov 2010 11:47:34 -0800 Message-ID: <1291060054.1792.88.camel@yehudasa-desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: Christian Brunner , Stefan Hajnoczi , ceph-devel@vger.kernel.org, qemu-devel@nongnu.org, kvm@vger.kernel.org X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.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 ##########################################