Received: from eggs.gnu.org ([2001:4830:134:3::10]:40763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvUgN-0003VD-TO for qemu-devel@nongnu.org; Fri, 22 Sep 2017 16:36:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dvUgK-0002vQ-P2 for qemu-devel@nongnu.org; Fri, 22 Sep 2017 16:36:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49636) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dvUgK-0002uy-Ex for qemu-devel@nongnu.org; Fri, 22 Sep 2017 16:36:16 -0400 References: <9a3ce498-040d-5d8f-41d0-a2a649771528@virtuozzo.com> From: Eric Blake Message-ID: <866e71c0-5d94-d9a2-d00b-3dd43319a1f8@redhat.com> Date: Fri, 22 Sep 2017 15:36:12 -0500 MIME-Version: 1.0 In-Reply-To: <9a3ce498-040d-5d8f-41d0-a2a649771528@virtuozzo.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Ncid48hltjlXwuwpkgxM7FcxgdJnR9ABj" Subject: Re: [Qemu-devel] nbd structured reply List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladimir Sementsov-Ogievskiy , Wouter Verhelst , Alex Bligh Cc: qemu-devel , nbd@other.debian.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Ncid48hltjlXwuwpkgxM7FcxgdJnR9ABj From: Eric Blake To: Vladimir Sementsov-Ogievskiy , Wouter Verhelst , Alex Bligh Cc: qemu-devel , nbd@other.debian.org Message-ID: <866e71c0-5d94-d9a2-d00b-3dd43319a1f8@redhat.com> Subject: Re: nbd structured reply References: <9a3ce498-040d-5d8f-41d0-a2a649771528@virtuozzo.com> In-Reply-To: <9a3ce498-040d-5d8f-41d0-a2a649771528@virtuozzo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/22/2017 09:57 AM, Vladimir Sementsov-Ogievskiy wrote: >> If you have suggestions for improving the NBD spec wording, feel free = to >> propose a doc patch. >> >=20 > Thanks, now I understand.. However I don't have good idea of wording.. >=20 >=20 > Another thing: server can send several error and success chunks on > CMD_READ.. Yes, and that is intentional. A server that spawns sub-tasks to read portions of the request to various parallel workers, and then sends those responses back to the client as sub-tasks finish, can indeed send multiple errors before sending the final chunk complete message. >=20 > The obvious behavior of client is to fail the whole read if it received= > one error chunk. Yes, the read has failed if the client sees at least one error chunk. The read is not successful unless there are no error chunks, and the server has sent chunks describing every portion of the request (the server is not allowed to send chunks that overlap, nor to send a successful chunk after sending an error for the same offset, nor to send a success message if it has not covered the entire request - but IS allowed to send multiple error chunks). > And, actually, client is not interesting in all following chunks for > this request. Perhaps not, but the client is not in control of how much the server sends, so it must gracefully deal with the remaining traffic from the server while waiting for the server to finally send the last chunk. > I think > we need some additional negotiation flag for this, which says that erro= r > chunk > must be final. Why? It adds complexity, for no real reason. (Read errors are not common, so it is okay if dealing with read errors requires more network traffic than normal). >=20 > May be we need also a method (command) to cancel one of inflight > requests, but it > is not so important. Again, that would add complexity that may be really hard to justify (we want to be able to implement stateless servers; a server that has to parse a second message from a client requesting to abort an in-flight command has to track state). So I don't think it is worth it. --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org --Ncid48hltjlXwuwpkgxM7FcxgdJnR9ABj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAlnFdDwACgkQp6FrSiUn Q2onrwf6A0r3UFu/Iir3OWzyg8+DUWrxLXQt1C4arCEolJalNjU2p88V57YpYLeh aLNDt2xmsFQ0pCUQ9g+WXKm0xc90yvj3gTMGbISLnVPfW8OcexX4US9GXbKym9pg ENMWPeN/yafpOBswEGsTt6+yj2HbpbH2sHCGzQw+bHD2cNfDRc/atziOLZqJrx1v Cl0x3sQopMOSpMkpcsXNGGw+mYKTp9X8RrhFOGs/mfcQM3xiX6Pxt/VSJaYqvIkT 9mU926IYtS8tc2yAbATceV7JYD7Py6HNQBRKvdbi8jH7QF8/41c/qV+LrZ2rNGky DUxgkcTzGhK5F/icDZTlNEYedioUaw== =Yq4G -----END PGP SIGNATURE----- --Ncid48hltjlXwuwpkgxM7FcxgdJnR9ABj--