fb53ca5547
libxl.add-option-to-disable-disk-cache-flushes-in-qdisk.patch qemu-xen-upstream-qdisk-cache-unsafe.patch - libxl: introduce an option for disabling the non-O_DIRECT workaround recognize direct-io-safe in domU.cfg diskspec libxl.introduce-an-option-to-disable-the-non-O_DIRECT-workaround.patch - fate#316071: add discard support for file backed storage (qdisk) update patch to allow more values in overloaded ->readwrite member - bnc#826717 - VUL-0: CVE-2013-3495: XSA-59: xen: Intel VT-d Interrupt Remapping engines can be evaded by native NMI interrupts 537b5e50-VT-d-apply-quirks-at-device-setup-time-rather-than-only-at-boot.patch 537b5e79-VT-d-extend-error-report-masking-workaround-to-newer-chipsets.patch - Upstream patches from Jan 53709b77-Nested-VMX-load-current_vmcs-only-when-it-exists.patch 53732f4f-x86-MCE-bypass-uninitialized-vcpu-in-vMCE-injection.patch 537b5ede-move-domain-to-cpupool0-before-destroying-it.patch - Update README.SuSE with information on the toolstack change - fate#316071: add discard support for file backed storage (qdisk) update to recognize option discard/no-discard instead of discard=0,1 to match upstream change OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=316
53 lines
1.8 KiB
Diff
53 lines
1.8 KiB
Diff
https://bugzilla.novell.com/show_bug.cgi?id=879425
|
|
---
|
|
tools/qemu-xen-dir-remote/hw/block/xen_disk.c | 15 +++++++++++++++
|
|
1 file changed, 15 insertions(+)
|
|
|
|
Index: xen-4.4.0-testing/tools/qemu-xen-dir-remote/hw/block/xen_disk.c
|
|
===================================================================
|
|
--- xen-4.4.0-testing.orig/tools/qemu-xen-dir-remote/hw/block/xen_disk.c
|
|
+++ xen-4.4.0-testing/tools/qemu-xen-dir-remote/hw/block/xen_disk.c
|
|
@@ -113,6 +113,7 @@ struct XenBlkDev {
|
|
int requests_inflight;
|
|
int requests_finished;
|
|
|
|
+ gboolean cache_unsafe;
|
|
/* Persistent grants extension */
|
|
gboolean feature_discard;
|
|
gboolean feature_persistent;
|
|
@@ -725,6 +726,16 @@ static void blk_parse_discard(struct Xen
|
|
xenstore_write_be_int(&blkdev->xendev, "feature-discard", 1);
|
|
}
|
|
|
|
+static void blk_parse_cache_unsafe(struct XenBlkDev *blkdev)
|
|
+{
|
|
+ int enable;
|
|
+
|
|
+ blkdev->cache_unsafe = false;
|
|
+
|
|
+ if (xenstore_read_be_int(&blkdev->xendev, "suse-diskcache-disable-flush", &enable) == 0)
|
|
+ blkdev->cache_unsafe = !!enable;
|
|
+}
|
|
+
|
|
static int blk_init(struct XenDevice *xendev)
|
|
{
|
|
struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev);
|
|
@@ -793,6 +804,7 @@ static int blk_init(struct XenDevice *xe
|
|
xenstore_write_be_int(&blkdev->xendev, "info", info);
|
|
|
|
blk_parse_discard(blkdev);
|
|
+ blk_parse_cache_unsafe(blkdev);
|
|
|
|
g_free(directiosafe);
|
|
return 0;
|
|
@@ -832,6 +844,9 @@ static int blk_connect(struct XenDevice
|
|
if (blkdev->feature_discard)
|
|
qflags |= BDRV_O_UNMAP;
|
|
|
|
+ if (blkdev->cache_unsafe)
|
|
+ qflags |= BDRV_O_NO_FLUSH;
|
|
+
|
|
/* init qemu block driver */
|
|
index = (blkdev->xendev.dev - 202 * 256) / 16;
|
|
blkdev->dinfo = drive_get(IF_XEN, 0, index);
|