From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMuej-0007AR-MU for qemu-devel@nongnu.org; Wed, 05 Aug 2015 05:06:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMuei-000688-IA for qemu-devel@nongnu.org; Wed, 05 Aug 2015 05:06:37 -0400 Date: Wed, 5 Aug 2015 10:06:27 +0100 From: "Daniel P. Berrange" Message-ID: <20150805090627.GA16246@redhat.com> References: <1438699705-21761-1-git-send-email-silbe@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1438699705-21761-1-git-send-email-silbe@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH] block: don't register quorum driver if SHA256 support is unavailable Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sascha Silbe Cc: Kevin Wolf , Alberto Garcia , qemu-devel@nongnu.org, qemu-block@nongnu.org On Tue, Aug 04, 2015 at 04:48:25PM +0200, Sascha Silbe wrote: > Commit 488981a4 [block: convert quorum blockdrv to use crypto APIs] > broke qemu-iotest 041 on hosts with GnuTLS < 2.10.0. It converted a > compile-time check to a run-time check at device open time. The result > is that we now advertise a feature (the quorum block driver) that will > never work (on those hosts). There's no way (short of parsing > human-readable error messages) for qemu-iotests or any other API > consumer to recognise that the quorum block driver isn't _actually_ > available and shouldn't be used or tested. > > Move the run-time check to bdrv_quorum_init() to avoid registering the > quorum block driver if we know it cannot work. This way API consumers > can recognise it's unavailable. > > Fixes: 488981a4af396551a3178d032cc2b41d9553ada2 > Signed-off-by: Sascha Silbe Reviewed-by: Daniel P. Berrange Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|