2010-09-28 00:07:21 +02:00
|
|
|
Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
2010-01-16 01:12:54 +01:00
|
|
|
===================================================================
|
2010-09-28 00:07:21 +02:00
|
|
|
--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
|
|
|
+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
2010-11-19 21:15:50 +01:00
|
|
|
@@ -257,8 +257,11 @@ static int open_disk(struct td_state *s,
|
2009-10-12 16:04:55 +02:00
|
|
|
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
|
2010-01-16 01:12:54 +01:00
|
|
|
+ * Use BDRV_O_CACHE_WB for write-through caching,
|
|
|
|
+ * no flags for write-back caching
|
2009-10-12 16:04:55 +02:00
|
|
|
+ */
|
|
|
|
+ if (bdrv_open2(bs, path, flags|BDRV_O_CACHE_WB, drv) != 0) {
|
|
|
|
fprintf(stderr, "Could not open image file %s\n", path);
|
|
|
|
return -ENOMEM;
|
|
|
|
}
|