From a5fced40212ed73c715ca298a2929dd4d99c9999 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 11 May 2022 19:49:23 -0500 Subject: qemu-nbd: Pass max connections to blockdev layer The next patch wants to adjust whether the NBD server code advertises MULTI_CONN based on whether it is known if the server limits to exactly one client. For a server started by QMP, this information is obtained through nbd_server_start (which can support more than one export); but for qemu-nbd (which supports exactly one export), it is controlled only by the command-line option -e/--shared. Since we already have a hook function used by qemu-nbd, it's easiest to just alter its signature to fit our needs. Signed-off-by: Eric Blake Message-Id: <20220512004924.417153-2-eblake@redhat.com> Signed-off-by: Kevin Wolf --- include/block/nbd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/block/nbd.h b/include/block/nbd.h index a98eb66..c5a29ce 100644 --- a/include/block/nbd.h +++ b/include/block/nbd.h @@ -344,7 +344,7 @@ void nbd_client_new(QIOChannelSocket *sioc, void nbd_client_get(NBDClient *client); void nbd_client_put(NBDClient *client); -void nbd_server_is_qemu_nbd(bool value); +void nbd_server_is_qemu_nbd(int max_connections); bool nbd_server_is_running(void); void nbd_server_start(SocketAddress *addr, const char *tls_creds, const char *tls_authz, uint32_t max_connections, -- cgit v1.1