From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2hKb-0004Dp-V2 for qemu-devel@nongnu.org; Tue, 17 May 2016 11:54:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2hKX-0000IF-5m for qemu-devel@nongnu.org; Tue, 17 May 2016 11:54:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2hKX-0000IA-0Q for qemu-devel@nongnu.org; Tue, 17 May 2016 11:54:45 -0400 Date: Tue, 17 May 2016 16:54:42 +0100 From: "Richard W.M. Jones" Message-ID: <20160517155442.GY1683@redhat.com> References: <1455640486-6101-1-git-send-email-pbonzini@redhat.com> <1455640486-6101-24-git-send-email-pbonzini@redhat.com> <20160517095339.GD28935@redhat.com> <573B342E.8030208@redhat.com> <5ED6FB6F-5023-4833-83F9-B24BD379E2CD@alex.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5ED6FB6F-5023-4833-83F9-B24BD379E2CD@alex.org.uk> Subject: Re: [Qemu-devel] [Nbd] [PULL 23/28] nbd: always query export list in fixed new style protocol List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Bligh Cc: Eric Blake , Paolo Bonzini , "Daniel P. Berrange" , "nbd-general@lists.sourceforge.net" , "qemu-devel@nongnu.org" On Tue, May 17, 2016 at 04:22:06PM +0100, Alex Bligh wrote: > nbdkit is non-compliant in that case. Support of NBD_OPT_LIST is > compulsory, even if you support it by returning a nameless export > (or default). Moreover support of export names is compulsory > (even if you have a single fixed one called "" or "default"). The protocol doc doesn't mention "default" (assuming you mean that literal string). It says: A special, "empty", name (i.e., the length field is zero and no name is specified), is reserved for a "default" export, to be used in cases where explicitly specifying an export name makes no sense. which seems to indicate only the empty string should be used for this case. Unfortunately qemu 2.5 (as a client) treated exportname == "" as meaning that the old-style protocol should be used. This is at least fixed in qemu 2.6, so nbdkit could now answer NBD_OPT_LIST with a single empty string, although we lose backwards compatibility with qemu 2.5. > Whilst that is fair enough, NBD_OPT_LIST is a mandatory part of the > specification. If a server doesn't implement mandatory parts of > the specification, then bad things will happen. It implements it, it's just that there wasn't a way to implement anything other than returning an error since we accept anything as an export name. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html