Re: [Qemu-devel] [PATCH v5 7/9] nbd: Implement NBD_OPT_GO on client

2017-07-19 Thread Vladimir Sementsov-Ogievskiy
19.07.2017 20:12, Eric Blake wrote: On 07/19/2017 11:43 AM, Vladimir Sementsov-Ogievskiy wrote: 07.07.2017 23:30, Eric Blake wrote: [..] +/* Returns -1 if NBD_OPT_GO proves the export @wantname cannot be + * used, 0 if NBD_OPT_GO is unsupported (fall back to NBD_OPT_LIST and + * NBD_OPT_EXPOR

Re: [Qemu-devel] [PATCH v5 7/9] nbd: Implement NBD_OPT_GO on client

2017-07-19 Thread Eric Blake
On 07/19/2017 11:43 AM, Vladimir Sementsov-Ogievskiy wrote: > 07.07.2017 23:30, Eric Blake wrote: > > [..] > >> >> +/* Returns -1 if NBD_OPT_GO proves the export @wantname cannot be >> + * used, 0 if NBD_OPT_GO is unsupported (fall back to NBD_OPT_LIST and >> + * NBD_OPT_EXPORT_NAME in that case)

Re: [Qemu-devel] [PATCH v5 7/9] nbd: Implement NBD_OPT_GO on client

2017-07-19 Thread Vladimir Sementsov-Ogievskiy
07.07.2017 23:30, Eric Blake wrote: [..] +/* Returns -1 if NBD_OPT_GO proves the export @wantname cannot be + * used, 0 if NBD_OPT_GO is unsupported (fall back to NBD_OPT_LIST and + * NBD_OPT_EXPORT_NAME in that case), and > 0 if the export is good to + * go (with @info populated). */ +static

[Qemu-devel] [PATCH v5 7/9] nbd: Implement NBD_OPT_GO on client

2017-07-07 Thread Eric Blake
NBD_OPT_EXPORT_NAME is lousy: per the NBD protocol, any failure requires the server to close the connection rather than report an error to us. Therefore, upstream NBD recently added NBD_OPT_GO as the improved version of the option that does what we want [1]: it reports sane errors on failures, and