From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2iMX-0006ok-Cu for qemu-devel@nongnu.org; Tue, 17 May 2016 13:00:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2iMT-0000tb-3l for qemu-devel@nongnu.org; Tue, 17 May 2016 13:00:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2iMS-0000s9-Qq for qemu-devel@nongnu.org; Tue, 17 May 2016 13:00:49 -0400 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> <20160517155442.GY1683@redhat.com> <997353B5-02CE-4678-A3DE-4B2CCE348303@alex.org.uk> From: Eric Blake Message-ID: <573B4E3C.7020004@redhat.com> Date: Tue, 17 May 2016 11:00:44 -0600 MIME-Version: 1.0 In-Reply-To: <997353B5-02CE-4678-A3DE-4B2CCE348303@alex.org.uk> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="n8cPAR1hlMFXkKUvTd9pJq6vsJbOG2BdH" 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 , "Richard W.M. Jones" Cc: Paolo Bonzini , "Daniel P. Berrange" , "nbd-general@lists.sourceforge.net" , "qemu-devel@nongnu.org" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --n8cPAR1hlMFXkKUvTd9pJq6vsJbOG2BdH Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/17/2016 10:26 AM, Alex Bligh wrote: >=20 > On 17 May 2016, at 16:54, Richard W.M. Jones wrote:= >=20 >> 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: >=20 > As per my message to Eric, I meant use an arbitrary piece of > text in your reply to NBD_OPT_LIST (it doesn't matter what it is, > 'default' is not special). It doesn't matter because you ignore > what is passed in NBD_OPT_EXPORT_NAME. I was just suggesting making > things more readable for clients that did a list. >=20 >>> 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. >=20 > In which case you should just return an export name. Any > export name will work. The fact you don't have names for your > exports doesn't mean (in my book) you can error the list > request. You have one export. You don't know what it's name is, > but you should list it. Except that the qemu 2.6 client is specifically checking that the name it is looking for is present in the list, and gives up trying if the name was not found. And there is no way for the server to know a priori which name the client is trying to match. An arbitrary name is less likely to be found; the empty name "" is the most likely arbitrary name, but even then, there is no guarantee that the qemu client is using the "" default name, and since NBD_OPT_EXPORT_NAME doesn't care, I think it's nicer to state that NBD_OPT_LIST should ONLY be supported if names matter to NBD_OPT_EXPORT_NAME (and should return NBD_REP_ERR_UNSUP when names don't matter). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --n8cPAR1hlMFXkKUvTd9pJq6vsJbOG2BdH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXO048AAoJEKeha0olJ0NqYWgIAKwS4zCk1LVQYZHgUpcsF7Av yDgnsuSvoR//Fz1zLn09Ie1YT/c7lVjwsQ9IyXaG6yYchGe5YxQLiEOER85Epxom BSsc1hoPDKClXw53WRwtm9Ma8+/RUJBJwVJAFkc9iLOv8uE3Z+KOo1xHjpgNwAFx hiylTrB2wod2iBiGwcRsUIeTNQF7VwEfO3xnVsQSh+DIvYCXvWCDSw0eqS+Nqg8b BUEG/PxMTy424OOP/447tBN+fRWQGeqLTaDVKp3O4vuk6RMtLqi2+K0duULoef0M bqnLB5DsOJNJaN6K9JkZEU0Z7d0TcUvJKqdifrIRWwEnekF29K92P0AKTfksg3Y= =xVBk -----END PGP SIGNATURE----- --n8cPAR1hlMFXkKUvTd9pJq6vsJbOG2BdH--