b658abd60f
libxl-remove-cdrom-cachemode.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=427
38 lines
1.7 KiB
Diff
38 lines
1.7 KiB
Diff
commit 3feb9059c31a5c08ec2c2ef81de439b6dec4f101
|
|
Author: Jim Fehlig <jfehlig@suse.com>
|
|
Date: Thu Apr 28 11:30:19 2016 -0600
|
|
|
|
libxl: don't add cache mode for qdisk cdrom drives
|
|
|
|
qemu commit 91a097e7 forbids specifying cache mode for empty
|
|
drives. Attempting to create a domain with an empty qdisk cdrom
|
|
drive results in
|
|
|
|
qemu-system-x86_64: -drive if=ide,index=1,readonly=on,media=cdrom,
|
|
cache=writeback,id=ide-832: Must specify either driver or file
|
|
|
|
libxl only allows an empty 'target=' for cdroms. By default, cdroms
|
|
are readonly (see the 'access' parameter in xl-disk-configuration.txt)
|
|
and forced to readonly by any tools (e.g. xl) using libxlutil's
|
|
xlu_disk_parse() function. With cdroms always marked readonly,
|
|
explicitly specifying the cache mode for cdrom drives can be dropped.
|
|
The drive's 'readonly=on' option can also be set unconditionally.
|
|
|
|
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
|
|
|
|
Index: xen-4.7.0-testing/tools/libxl/libxl_dm.c
|
|
===================================================================
|
|
--- xen-4.7.0-testing.orig/tools/libxl/libxl_dm.c
|
|
+++ xen-4.7.0-testing/tools/libxl/libxl_dm.c
|
|
@@ -1368,8 +1368,8 @@ static int libxl__build_device_model_arg
|
|
|
|
if (disks[i].is_cdrom) {
|
|
drive = libxl__sprintf(gc,
|
|
- "if=ide,index=%d,readonly=%s,media=cdrom,cache=writeback,id=ide-%i",
|
|
- disk, disks[i].readwrite ? "off" : "on", dev_number);
|
|
+ "if=ide,index=%d,readonly=on,media=cdrom,id=ide-%i",
|
|
+ disk, dev_number);
|
|
|
|
if (target_path)
|
|
drive = libxl__sprintf(gc, "%s,file=%s,format=%s",
|