Re: [Nbd] [PATCH v3 1/2] doc: Use dedicated reply types for NBD_OPT_INFO/GO
- To: Eric Blake <eblake@...696...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] [PATCH v3 1/2] doc: Use dedicated reply types for NBD_OPT_INFO/GO
- From: Wouter Verhelst <w@...112...>
- Date: Thu, 14 Apr 2016 09:25:25 +0200
- Message-id: <20160414072525.GE4825@...3...>
- In-reply-to: <1460594250-12643-2-git-send-email-eblake@...696...>
- References: <1460594250-12643-1-git-send-email-eblake@...696...> <1460594250-12643-2-git-send-email-eblake@...696...>
Hi Eric,
On Wed, Apr 13, 2016 at 06:37:29PM -0600, Eric Blake wrote:
> Since NBD_OPT_INFO and NBD_OPT_GO are experimental, we still have
> a chance to fix them up before promoting them to stable.
>
> Attempting to reuse NBD_OPT_SERVER as the reply to NBD_OPT_INFO and
> NBD_OPT_GO has a few problems: clients must be prepared to parse
> two different styles of the reply, based on which option request
> the reply is answering. Extending the information to provide even
> more details, like block sizing, is awkward (the only way to do it
> within a single reply is to have multiple length fields that must
> all be consistent; and pre-computing the overall header length may
> be difficult). And requiring the server to parrot back the export
> name is wasteful if the client's name is already in canonical
> form.
Right.
> Solve this by instead making the valid response be a series of reply
> messages (similar to how NBD_OPT_LIST has a series). The series
> is always ended by the new NBD_REP_EXPORT, which is basically a
If we're going to make it a series of messages, I would prefer that the
final message be an NBD_REP_ACK. That way, wire sniffers can always spot
the end of a multi-message reply by way of the ACK at the end, even if
they don't understand the actual multi-message reply.
(no other comments at this point)
--
< ron> I mean, the main *practical* problem with C++, is there's like a dozen
people in the world who think they really understand all of its rules,
and pretty much all of them are just lying to themselves too.
-- #debian-devel, OFTC, 2016-02-12
Reply to: