Re: [Nbd] NBD_OPT_GO
On 5 Apr 2016, at 14:49, Eric Blake <eblake@...696...> wrote:
> Or are you proposing that you could use either NBD_OPT_SELECT followed
> by NBD_OPT_GO (no name), OR use NBD_OPT_GO+name (no NBD_OPT_SELECT),
> both as new ways to exit the handshake phase while still keeping the
> door open for error reporting? Okay, then in that case, it would allow
> one less back-and-forth between client and server if NBD_OPT_GO can
> include an optional name.
This
> But how does it play with the special case of
> "" as the name of the default export?
NBD_OPT_EXPORT_NAME with name="" selects default export
NBD_OPT_SELECT with name="" selects default export and returns
the name of the default export
NBD_OPT_GO with name="" selects the previously selected
NBD_OPT_SELECT (if one was selected), else the default export.
> NBD_OPT_SELECT can gracefully
> handle the empty name as selecting the default export, but NBD_OPT_GO
> would be ambiguous as to whether you are using it without a name option,
> or if you are using the optional name option to explicitly select the
> default export.
It depends whether you did a SELECT first.
--
Alex Bligh
COO & CTO, Flexiant Ltd
Reply to: