[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 19/21] qemu-nbd: Add --list option
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
Re: [Qemu-devel] [PATCH v4 19/21] qemu-nbd: Add --list option |
Date: |
Fri, 18 Jan 2019 12:28:06 +0000 |
17.01.2019 22:36, Eric Blake wrote:
> We want to be able to detect whether a given qemu NBD server is
> exposing the right export(s) and dirty bitmaps, at least for
> regression testing. We could use 'nbd-client -l' from the upstream
> NBD project to list exports, but it's annoying to rely on
> out-of-tree binaries; furthermore, nbd-client doesn't necessarily
> know about all of the qemu NBD extensions. Thus, it is time to add
> a new mode to qemu-nbd that merely sniffs all possible information
> from the server during handshake phase, then disconnects and dumps
> the information.
[..] (hm, first time I do it for commit message)
> Not done here, but maybe worth future experiments: capture
> the meat of NBDExportInfo into a QAPI struct, and use the
> generated QAPI pretty-printers instead of hand-rolling our
> output loop. It would also permit us to add a JSON output
> mode for machine parsing.
>
> Signed-off-by: Eric Blake <address@hidden>
> Reviewed-by: Richard W.M. Jones <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> @@ -816,6 +940,11 @@ int main(int argc, char **argv)
> }
> }
>
> + if (list) {
> + saddr = nbd_build_socket_address(sockpath, bindto, port);
> + return qemu_nbd_client_list(saddr, tlscreds, bindto);
note, that this main() prefers to use exit() instead of return, even for last
exit(EXIT_SUCCESS).
(but it has already one return, so this is not the first, and for me return
looks better)
--
Best regards,
Vladimir
- Re: [Qemu-devel] [PATCH v4 11/21] nbd/client: Split out nbd_send_meta_query(), (continued)
- [Qemu-devel] [PATCH v4 20/21] nbd/client: Work around 3.0 bug for listing meta contexts, Eric Blake, 2019/01/17
- [Qemu-devel] [PATCH v4 10/21] nbd/client: Change signature of nbd_negotiate_simple_meta_context(), Eric Blake, 2019/01/17
- [Qemu-devel] [PATCH v4 16/21] nbd/client: Refactor nbd_opt_go() to support NBD_OPT_INFO, Eric Blake, 2019/01/17
- [Qemu-devel] [PATCH v4 17/21] nbd/client: Add nbd_receive_export_list(), Eric Blake, 2019/01/17
- [Qemu-devel] [PATCH v4 18/21] nbd/client: Add meta contexts to nbd_receive_export_list(), Eric Blake, 2019/01/17
- [Qemu-devel] [PATCH v4 14/21] nbd/client: Split handshake into two functions, Eric Blake, 2019/01/17
- [Qemu-devel] [PATCH v4 19/21] qemu-nbd: Add --list option, Eric Blake, 2019/01/17
- Re: [Qemu-devel] [PATCH v4 19/21] qemu-nbd: Add --list option,
Vladimir Sementsov-Ogievskiy <=
- [Qemu-devel] [PATCH v4 12/21] nbd/client: Split out nbd_receive_one_meta_context(), Eric Blake, 2019/01/17
- [Qemu-devel] [PATCH v4 13/21] nbd/client: Refactor return of nbd_receive_negotiate(), Eric Blake, 2019/01/17
- [Qemu-devel] [PATCH v4 21/21] iotests: Enhance 223, 233 to cover 'qemu-nbd --list', Eric Blake, 2019/01/17
- Re: [Qemu-devel] [PATCH v4 00/21] nbd: add qemu-nbd --list, Vladimir Sementsov-Ogievskiy, 2019/01/18
- Re: [Qemu-devel] [PATCH v4 00/21] nbd: add qemu-nbd --list, Vladimir Sementsov-Ogievskiy, 2019/01/18
- Re: [Qemu-devel] [PATCH v4 00/21] nbd: add qemu-nbd --list, Eric Blake, 2019/01/18
- Re: [Qemu-devel] [PATCH v4 00/21] nbd: add qemu-nbd --list, Eric Blake, 2019/01/18
- Re: [Qemu-devel] [PATCH v4 00/21] nbd: add qemu-nbd --list, Richard W.M. Jones, 2019/01/19
- Re: [Qemu-devel] [PATCH v4 00/21] nbd: add qemu-nbd --list, Richard W.M. Jones, 2019/01/19
- Re: [Qemu-devel] [PATCH v4 00/21] nbd: add qemu-nbd --list, Richard W.M. Jones, 2019/01/20