Received: from eggs.gnu.org ([2001:4830:134:3::10]:60046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKLFd-00035h-GJ for qemu-devel@nongnu.org; Tue, 05 Jul 2016 03:58:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKLFY-0004Yk-FI for qemu-devel@nongnu.org; Tue, 05 Jul 2016 03:58:36 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:57914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKLFY-0004YK-64 for qemu-devel@nongnu.org; Tue, 05 Jul 2016 03:58:32 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u657riIb108086 for ; Tue, 5 Jul 2016 03:58:31 -0400 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0a-001b2d01.pphosted.com with ESMTP id 23xa52dkxs-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 05 Jul 2016 03:58:30 -0400 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 5 Jul 2016 08:58:28 +0100 From: Sascha Silbe In-Reply-To: <20160628014747.20971-1-famz@redhat.com> References: <20160628014747.20971-1-famz@redhat.com> Date: Tue, 05 Jul 2016 09:58:25 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-Id: <87k2h0ldni.fsf@oc4731375738.ibm.com> Subject: Re: [Qemu-devel] [PATCH] quorum: Only compile when supported List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: Kevin Wolf , Alberto Garcia , qemu-block@nongnu.org, Max Reitz Dear Fam (or Zheng?), Fam Zheng writes: > This was the only exceptional module init function that does something > else than a simple list of bdrv_register() calls, in all the block > drivers. > > The qcrypto_hash_supports is actually a static check, determined at > compile time. Follow the block-job-$(CONFIG_FOO) convention for > consistency. Good idea. [block/Makefile.objs] > @@ -3,7 +3,7 @@ block-obj-y +=3D qcow2.o qcow2-refcount.o qcow2-cluster.o= qcow2-snapshot.o qcow2-c > block-obj-y +=3D qed.o qed-gencb.o qed-l2-cache.o qed-table.o qed-cluste= r.o > block-obj-y +=3D qed-check.o > block-obj-$(CONFIG_VHDX) +=3D vhdx.o vhdx-endian.o vhdx-log.o > -block-obj-y +=3D quorum.o > +block-obj-$(CONFIG_GNUTLS_HASH) +=3D quorum.o [...] [block/quorum.c] > static void bdrv_quorum_init(void) > { > - if (!qcrypto_hash_supports(QCRYPTO_HASH_ALG_SHA256)) { > - /* SHA256 hash support is required for quorum device */ > - return; > - } > bdrv_register(&bdrv_quorum); The quorum driver needs SHA256 which was introduced in gnutls 2.11.1. However configure sets CONFIG_GNUTLS_HASH when gnutls 2.9.10+ is present. You should either bump the version in configure or add an explicit configure check for SHA256. Sascha --=20 Softwareentwicklung Sascha Silbe, Niederhofenstra=C3=9Fe 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641