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

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