Re: [Nbd] [PATCH] Swap options and option name
- To: Eric Blake <eblake@...696...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] [PATCH] Swap options and option name
- From: Wouter Verhelst <w@...112...>
- Date: Sat, 15 Apr 2017 02:33:52 +0200
- Message-id: <20170415003352.bdoidbusij3lyan2@...3...>
- In-reply-to: <596b5e4f-16c8-b010-dd15-06933e9d93e6@...696...>
- References: <20170414124637.lloiojthqzpiilty@...3...> <596b5e4f-16c8-b010-dd15-06933e9d93e6@...696...>
On Fri, Apr 14, 2017 at 01:03:00PM -0500, Eric Blake wrote:
> On 04/14/2017 07:46 AM, Wouter Verhelst wrote:
> > When trying to reply to a client with certain information, it's useful
> > if we don't need to read the whole reply but can handle it by reading
> > one option, handling it, reading the next one, etc etc. This requires
> > that the server is told which export to deal with before getting the
> > option names, however.
> >
> > As specified, that isn't the case, so this would require the server to
> > read in the whole request before it can start processing it.
> >
> > Swap options around to make handling the INFO/GO messages easier to do.
>
> I'm so glad my patches for NBD_OPT_GO didn't make it into qemu 2.9 (due
> to be released later this month).
Heh :-)
> It's pretty easy for me to fix them to accommodate this new order, and they
> should make it into qemu 2.10.
>
> >
> > Signed-off-by: Wouter Verhelst <w@...112...>
> > ---
> > doc/proto.md | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/doc/proto.md b/doc/proto.md
> > index 92df086..8712626 100644
> > --- a/doc/proto.md
> > +++ b/doc/proto.md
> > @@ -919,11 +919,11 @@ of the newstyle negotiation.
> >
> > Data (both commands):
> >
> > - - 16 bits, number of information requests
> > - - 16 bits x n - list of `NBD_INFO` information requests
> > - 32 bits, length of name (unsigned); MUST be no larger than the
> > option data length - 6
> > - String: name of the export
> > + - 16 bits, number of information requests
> > + - 16 bits x n - list of `NBD_INFO` information requests
> >
>
> I don't see any drawbacks to this change, and your rationale for
> covering the block name first makes sense. ACK.
Glad you agree. So committed (along with an implementation, though it still
needs some testing).
--
< 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: