summaryrefslogtreecommitdiffstats
path: root/qemu-nbd.c
diff options
context:
space:
mode:
authorEric Blake2022-05-12 02:49:23 +0200
committerKevin Wolf2022-05-12 13:10:52 +0200
commita5fced40212ed73c715ca298a2929dd4d99c9999 (patch)
treecb41db6786ba8c64477d3b697ceb3326b0ce0150 /qemu-nbd.c
parenttests/qtest/fdc-test: Add a regression test for CVE-2021-3507 (diff)
downloadqemu-a5fced40212ed73c715ca298a2929dd4d99c9999.tar.gz
qemu-a5fced40212ed73c715ca298a2929dd4d99c9999.tar.xz
qemu-a5fced40212ed73c715ca298a2929dd4d99c9999.zip
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 <eblake@redhat.com> Message-Id: <20220512004924.417153-2-eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-nbd.c')
-rw-r--r--qemu-nbd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-nbd.c b/qemu-nbd.c
index 2382b5042a..0cd5aa6f02 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -1095,7 +1095,7 @@ int main(int argc, char **argv)
bs->detect_zeroes = detect_zeroes;
- nbd_server_is_qemu_nbd(true);
+ nbd_server_is_qemu_nbd(shared);
export_opts = g_new(BlockExportOptions, 1);
*export_opts = (BlockExportOptions) {