42 lines
1.3 KiB
Diff
42 lines
1.3 KiB
Diff
From a6aa06d4999129f44ae84310e950b8c3a4620fe5 Mon Sep 17 00:00:00 2001
|
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
Date: Wed, 19 Jan 2022 18:35:40 +0000
|
|
Subject: [PATCH] lib/qemuNBD.ml: Use qemu-nbd --shared=0 flag to allow
|
|
multiple connections
|
|
|
|
qemu-nbd --shared (-e) flag controls how many clients can connect
|
|
concurrently. 0 means unlimited.
|
|
|
|
We want to allow the sockets to be queried by other processes while
|
|
virt-v2v is running and it should be safe to do this. The default
|
|
configuration of qemu-nbd doesn't allow this so add --shared=0.
|
|
|
|
Note this does not (in current qemu) enable multi-conn because we
|
|
aren't using the -r (read-only) flag.
|
|
|
|
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
---
|
|
lib/qemuNBD.ml | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/lib/qemuNBD.ml b/lib/qemuNBD.ml
|
|
index 12d083ae..89c93d70 100644
|
|
--- a/lib/qemuNBD.ml
|
|
+++ b/lib/qemuNBD.ml
|
|
@@ -90,7 +90,11 @@ let run_unix ?socket { disk; snapshot; format } =
|
|
(* Construct the qemu-nbd command line. *)
|
|
let args = ref [] in
|
|
List.push_back_list args
|
|
- ["qemu-nbd"; "-t"; "--pid-file"; pidfile; "--socket"; socket];
|
|
+ ["qemu-nbd";
|
|
+ "-t";
|
|
+ "--shared=0";
|
|
+ "--pid-file"; pidfile;
|
|
+ "--socket"; socket];
|
|
|
|
(* -s adds a protective overlay. *)
|
|
if snapshot then List.push_back args "-s";
|
|
--
|
|
2.19.1.3.g30247aa5d201
|
|
|