Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
xen.7317
qemu-xen-upstream-qdisk-cache-unsafe.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File qemu-xen-upstream-qdisk-cache-unsafe.patch of Package xen.7317
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.2-testing/tools/qemu-xen-dir-remote/hw/block/xen_disk.c =================================================================== --- xen-4.4.2-testing.orig/tools/qemu-xen-dir-remote/hw/block/xen_disk.c +++ xen-4.4.2-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; @@ -767,6 +768,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); @@ -835,6 +846,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; @@ -874,6 +886,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);
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