From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2iJz-0005Ob-HO for qemu-devel@nongnu.org; Tue, 17 May 2016 12:58:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2iJu-0000I2-GZ for qemu-devel@nongnu.org; Tue, 17 May 2016 12:58:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2iJu-0000Hy-7m for qemu-devel@nongnu.org; Tue, 17 May 2016 12:58:10 -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> <573B3FC6.2060907@redhat.com> <20160517163926.GA1683@redhat.com> From: Eric Blake Message-ID: <573B4DA0.502@redhat.com> Date: Tue, 17 May 2016 10:58:08 -0600 MIME-Version: 1.0 In-Reply-To: <20160517163926.GA1683@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kSQGU3qS8aaIBA8Q7mAVtuni0DIDIa9MT" 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: "Richard W.M. Jones" Cc: Alex Bligh , "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) --kSQGU3qS8aaIBA8Q7mAVtuni0DIDIa9MT Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/17/2016 10:39 AM, Richard W.M. Jones wrote: > On Tue, May 17, 2016 at 09:59:02AM -0600, Eric Blake wrote: >> 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". >>> >>> As I read the protocol, I don't see "default" as a permissible name o= f >>> the default export, just "". >>> >>> 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 rewo= rd >>> 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 = the >>> 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. >=20 > Bleah you are right. I misread the code I wrote :-( >=20 > We can add a empty string list entry there easily enough. Will adding the empty string break qemu 2.5 connections? qemu 2.6 is picky in that if the name it is requesting is not in the advertised list, it gives up; but if there is NO advertised list, it assumes the name will just work. Since nbdkit has the latter behavior, I'm thinking that nbdkit returning NBD_REP_ERR_UNSUP instead of NBD_REP_ACK is a smarter course of action. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --kSQGU3qS8aaIBA8Q7mAVtuni0DIDIa9MT 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/ iQEcBAEBCAAGBQJXO02gAAoJEKeha0olJ0NqXpQH/jvLF7Ys3sW6xOsWG9LfE78Q L2uedH0fQ1NwdcglTp5TqviC4ZqQah3HTHEXP6iyEcVyT4e+LzuGVZkOg5pmSOKR FxITNW+mWq7vi7pjYqJ2kpGk7AAzWIQ3VVm90+iSvHVKE9SrE+GoIR4HAJvQ53B1 vV2oR5H7WNOl3pjfq+CictqFmOL4951KJNoeOCGG2ohKSzNLJzvgf7SD92f4by3y wkWUqVpIYYXbxv2g/iCuNcZ1xr+/LTPlWszKjk1ui6aAA6n6Zz7jV40m3wfDWwT3 S9eIJV62gsYSj57ms5pKrnSSG76j+fTlNpSbotD+r/pK3A+BigJZInJx6ZONiws= =keI5 -----END PGP SIGNATURE----- --kSQGU3qS8aaIBA8Q7mAVtuni0DIDIa9MT--