From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53734) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2hOk-0006yp-5O for qemu-devel@nongnu.org; Tue, 17 May 2016 11:59:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2hOh-0001ol-VZ for qemu-devel@nongnu.org; Tue, 17 May 2016 11:59:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57964) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2hOh-0001oh-N3 for qemu-devel@nongnu.org; Tue, 17 May 2016 11:59:03 -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> <573B3E3E.60902@redhat.com> From: Eric Blake Message-ID: <573B3FC6.2060907@redhat.com> Date: Tue, 17 May 2016 09:59:02 -0600 MIME-Version: 1.0 In-Reply-To: <573B3E3E.60902@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="L8XXOITji66xtsAjGjtVhgpNSIleolTLH" 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: "nbd-general@lists.sourceforge.net" , Paolo Bonzini , "Daniel P. Berrange" , "qemu-devel@nongnu.org" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --L8XXOITji66xtsAjGjtVhgpNSIleolTLH Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/17/2016 09:52 AM, Eric Blake wrote: >>> Perhaps nbdkit should implement NBD_OPT_LIST returning just "" (the >>> default name) as its only list entry? >> >> Or "default". >=20 > As I read the protocol, I don't see "default" as a permissible name of > the default export, just "". >=20 > Also, we currently state that NBD_OPT_LIST has zero or more > NBD_REP_SERVER replies, which means that it is valid for the command to= > succeed with NBD_REP_ACK _without_ advertising any exports at all > (rather annoying in that it tells you nothing about whether > NBD_OPT_EXPORT_NAME/NBD_OPT_GO will succeed anyways). Should we reword= > that to require that if NBD_REP_ACK is sent, then at least one > NBD_REP_SERVER reply was given (where "" is the obvious name, but at th= e > same time where "" is not mandatory if some other name is given)? Okay, I just downloaded nbdkit code and checked; nbdkit is sending 0 entries and NBD_REP_ACK (for success), and NOT an error code; so it is implying that there are NO known export names but that the command was recognized. >> >> My interpretation of NBD_OPT_LIST failing would be 'this server >> doesn't have anything it can export'. >=20 > Indeed, and that's why qemu as a client is currently dropping the > connection with nbdkit. Except that nbdkit is NOT failing NBD_OPT_LIST, just merely listing 0 replies. > But I would also make that interpretation for > NBD_OPT_LIST succeeding with NBD_REP_ACK with 0 NBD_REP_SERVER replies = - which is the nbdkit behavior > so maybe it is worth a note in the protocol how to detect servers that > are exporting exactly one volume and don't care what name you pass, the= n > tweaking either nbdkit, qemu, or both to comply to that added protocol > wording. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --L8XXOITji66xtsAjGjtVhgpNSIleolTLH 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/ iQEcBAEBCAAGBQJXOz/GAAoJEKeha0olJ0NqX5UH/A3WZKHgz43A4FVRri7Qcfqt GWz5LHCR0w+pREiwzaDYqBeOukBgKrdNJg8aw1jJSfJ1iDdUcY2DeiLszej7UDFx ONBC9AYOG4mhmdyOIH8ciaBqgzg/sXVq0ZVFJl5ue0TW77gVdTmA7Npp9dMcCFtX lG9sPbGp/DSlIf+ZFcgl4A6zC+ybv9DfiP/VlaSnTPVtldez6x/oEkK9mxPlAq3X umMhk0KVdYjl865TJkFiGSD33hFtcoVoC9jcs8vdfzBWds2/1RvfhXxjq8ChtTf2 Xx02bg9wXTrHuWwP4ZvIA11oLVtYPZarYFb2v8S7jFQWccPN6J9nyL+umC27i+Y= =qA8w -----END PGP SIGNATURE----- --L8XXOITji66xtsAjGjtVhgpNSIleolTLH--