Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:Update
libguestfs
0002-disable-qemu-locking-on-readonly-drives.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0002-disable-qemu-locking-on-readonly-drives.patch of Package libguestfs
From 9fe592808ccfd9ed184b88ca9c6cad2e1798dee3 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" <rjones@redhat.com> Date: Tue, 12 Sep 2017 10:48:37 +0100 Subject: [PATCH] launch: direct: Disable qemu locking when opening drives readonly (RHBZ#1417306). --- lib/launch-direct.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) Index: libguestfs-1.32.4/src/launch-direct.c =================================================================== --- libguestfs-1.32.4.orig/src/launch-direct.c +++ libguestfs-1.32.4/src/launch-direct.c @@ -55,6 +55,7 @@ struct backend_direct_data { char *qemu_help; /* Output of qemu -help. */ char *qemu_version; /* Output of qemu -version. */ + int qemu_mandatory_locking; /* qemu >= 2.10 does mandatory locking */ char *qemu_devices; /* Output of qemu -device ? */ /* qemu version (0, 0 if unable to parse). */ @@ -293,6 +294,11 @@ launch_direct (guestfs_h *g, void *datav if (qemu_supports (g, data, NULL) == -1) goto cleanup0; + data->qemu_mandatory_locking = + qemu_mandatory_locking (g, data); + debug (g, "qemu mandatory locking: %s", + data->qemu_mandatory_locking ? "yes" : "no"); + /* Using virtio-serial, we need to create a local Unix domain socket * for qemu to connect to. */ @@ -519,10 +525,11 @@ launch_direct (guestfs_h *g, void *datav /* Writable qcow2 overlay on top of read-only drive. */ escaped_file = qemu_escape_param (g, drv->overlay); param = safe_asprintf - (g, "file=%s,cache=unsafe,format=qcow2%s%s,id=hd%zu", + (g, "file.file.filename=%s,cache=unsafe,file.driver=qcow2%s%s%s,id=hd%zu", escaped_file, drv->disk_label ? ",serial=" : "", drv->disk_label ? drv->disk_label : "", + data->qemu_mandatory_locking ? ",file.backing.file.locking=off" : "", i); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor