Blame SOURCES/0080-launch-direct-Omit-locking-option-for-non-file-disks.patch

a30de4
From 05095797e4adf7c5afa807972c25dbe0998f5bcf Mon Sep 17 00:00:00 2001
a30de4
From: Lars Seipel <ls@slrz.net>
a30de4
Date: Thu, 23 Nov 2017 06:15:28 +0100
a30de4
Subject: [PATCH] launch: direct: Omit locking option for non-file disks
a30de4
 (RHBZ#1516094)
a30de4
a30de4
QEMU does not accept options unrecognized by the block driver
a30de4
in use. Disable locking only for read-only disks that are
a30de4
file-backed, as that's the only block driver it is supported
a30de4
with.
a30de4
a30de4
Signed-off-by: Lars Seipel <ls@slrz.net>
a30de4
(cherry picked from commit 35320dd0edb94d09d231bcded57aa883a5e7c784)
a30de4
---
a30de4
 lib/launch-direct.c | 2 +-
a30de4
 1 file changed, 1 insertion(+), 1 deletion(-)
a30de4
a30de4
diff --git a/lib/launch-direct.c b/lib/launch-direct.c
a30de4
index 0fef05927..4f31ac231 100644
a30de4
--- a/lib/launch-direct.c
a30de4
+++ b/lib/launch-direct.c
a30de4
@@ -534,7 +534,7 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
a30de4
          escaped_file,
a30de4
          drv->disk_label ? ",serial=" : "",
a30de4
          drv->disk_label ? drv->disk_label : "",
a30de4
-         data->qemu_mandatory_locking ? ",file.backing.file.locking=off" : "",
a30de4
+         data->qemu_mandatory_locking && drv->src.protocol == drive_protocol_file ? ",file.backing.file.locking=off" : "",
a30de4
          i);
a30de4
     }
a30de4
 
a30de4
-- 
a30de4
2.14.3
a30de4