abf8af324b
- Include systemd presets in 13.2 and older - bnc#897352 - Enable xencommons/xendomains only during fresh install - disable restart on upgrade because the toolstack is not restartable - adjust seabios, vgabios, stubdom and hvmloader build to reduce build-compare noise xen.build-compare.mini-os.patch xen.build-compare.smbiosdate.patch xen.build-compare.ipxe.patch xen.build-compare.vgabios.patch xen.build-compare.seabios.patch xen.build-compare.man.patch - Update to Xen 4.5.0 RC4 - Remove xend specific if-up scripts Recording bridge slaves is a generic task which should be handled by generic network code - Use systemd features from upstream requires updated systemd-presets-branding package - Update to Xen 4.5.0 RC3 - Set GIT, WGET and FTP to /bin/false - Use new configure features instead of make variables OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=337
53 lines
1.7 KiB
Diff
53 lines
1.7 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.5.0-testing/tools/qemu-xen-dir-remote/hw/block/xen_disk.c
|
|
===================================================================
|
|
--- xen-4.5.0-testing.orig/tools/qemu-xen-dir-remote/hw/block/xen_disk.c
|
|
+++ xen-4.5.0-testing/tools/qemu-xen-dir-remote/hw/block/xen_disk.c
|
|
@@ -120,6 +120,7 @@ struct XenBlkDev {
|
|
int requests_inflight;
|
|
int requests_finished;
|
|
|
|
+ gboolean cache_unsafe;
|
|
/* Persistent grants extension */
|
|
gboolean feature_discard;
|
|
gboolean feature_persistent;
|
|
@@ -780,6 +781,16 @@ static void blk_parse_discard(struct Xen
|
|
}
|
|
}
|
|
|
|
+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);
|
|
@@ -848,6 +859,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;
|
|
@@ -888,6 +900,9 @@ static int blk_connect(struct XenDevice
|
|
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);
|