ef5fbb5721
- Backport upstream ddab06d5eb99 [master] / 9e1c78a4dda8 [rhel-9.1]. - copy-patches.sh: rewrap patch formatting command, spell out "--patience" (already expected), then decrease churn by passing "--no-signature". - Migrate earlier rhbz#2062360 %changelog entries to latest (=new) entry. resolves: rhbz#2062360 Signed-off-by: Laszlo Ersek <lersek@redhat.com>
34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
From f820585c37beb648ab856818179091349a604523 Mon Sep 17 00:00:00 2001
|
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
Date: Fri, 15 Jul 2022 11:37:46 +0100
|
|
Subject: [PATCH] -o rhv: Wait for the NBD server to exit to avoid a race with
|
|
unmounting
|
|
|
|
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1953286#c26
|
|
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
(cherry picked from commit 2fbd578b4e6884a23063ad67ee36f02c4eb6c668)
|
|
---
|
|
output/output_rhv.ml | 9 ++++++++-
|
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/output/output_rhv.ml b/output/output_rhv.ml
|
|
index 15a2c14a..45f831e3 100644
|
|
--- a/output/output_rhv.ml
|
|
+++ b/output/output_rhv.ml
|
|
@@ -175,7 +175,14 @@ module RHV = struct
|
|
chmod filename 0o666
|
|
)
|
|
in
|
|
- output_to_local_file ~changeuid
|
|
+
|
|
+ (* We have to wait for the NBD server to exit rather than just
|
|
+ * killing it, otherwise it races with unmounting. See:
|
|
+ * https://bugzilla.redhat.com/show_bug.cgi?id=1953286#c26
|
|
+ *)
|
|
+ let on_exit_kill = Output.KillAndWait in
|
|
+
|
|
+ output_to_local_file ~changeuid ~on_exit_kill
|
|
output_alloc output_format filename size socket
|
|
) (List.combine disks filenames);
|
|
|