19 lines
818 B
Diff
19 lines
818 B
Diff
|
Index: xen-4.2.0-testing/tools/qemu-xen-traditional-dir-remote/hw/xen_blktap.c
|
||
|
===================================================================
|
||
|
--- xen-4.2.0-testing.orig/tools/qemu-xen-traditional-dir-remote/hw/xen_blktap.c
|
||
|
+++ xen-4.2.0-testing/tools/qemu-xen-traditional-dir-remote/hw/xen_blktap.c
|
||
|
@@ -247,8 +247,11 @@ static int open_disk(struct td_state *s,
|
||
|
drv = blktap_drivers[i].drv;
|
||
|
DPRINTF("%s driver specified\n", drv ? drv->format_name : "No");
|
||
|
|
||
|
- /* Open the image */
|
||
|
- if (bdrv_open2(bs, path, flags, drv) != 0) {
|
||
|
+ /* Open the image
|
||
|
+ * Use BDRV_O_CACHE_WB for write-through caching,
|
||
|
+ * no flags for write-back caching
|
||
|
+ */
|
||
|
+ if (bdrv_open2(bs, path, flags|BDRV_O_CACHE_WB, drv) != 0) {
|
||
|
fprintf(stderr, "Could not open image file %s\n", path);
|
||
|
return -ENOMEM;
|
||
|
}
|