]> git.ipfire.org Git - thirdparty/qemu.git/commit
nbd/client: Move export name into NBDExportInfo
authorEric Blake <eblake@redhat.com>
Thu, 17 Jan 2019 19:36:46 +0000 (13:36 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 21 Jan 2019 21:49:52 +0000 (15:49 -0600)
commit6dc1667d6881add34e9bad48ac2a848134ea8a6d
treebed0899a62de2613ea2111aee3de842c9fce619f
parent091d0bf3c94737fc451a9b3f4eddf3a4d74c90b8
nbd/client: Move export name into NBDExportInfo

Refactor the 'name' parameter of nbd_receive_negotiate() from
being a separate parameter into being part of the in-out 'info'.
This also spills over to a simplification of nbd_opt_go().

The main driver for this refactoring is that an upcoming patch
would like to add support to qemu-nbd to list information about
all exports available on a server, where the name(s) will be
provided by the server instead of the client.  But another benefit
is that we can now allow the client to explicitly specify the
empty export name "" even when connecting to an oldstyle server
(even if qemu is no longer such a server after commit 7f7dfe2a).

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20190117193658.16413-10-eblake@redhat.com>
block/nbd-client.c
include/block/nbd.h
nbd/client.c
nbd/trace-events
qemu-nbd.c