8547e28bd5
23233-hvm-cr-access.patch 23234-svm-decode-assist-base.patch 23235-svm-decode-assist-crs.patch 23236-svm-decode-assist-invlpg.patch 23238-svm-decode-assist-insn-fetch.patch 23303-cpufreq-misc.patch 23304-amd-oprofile-strings.patch 23305-amd-fam15-xenoprof.patch 23306-amd-fam15-vpmu.patch 23334-amd-fam12+14-vpmu.patch 23338-vtd-force-intremap.patch - fate#310957 - Update to Xen 4.1.1-rc1 c/s 23064 - xentrace: dynamic tracebuffer allocation xen-unstable.xentrace.dynamic_tbuf.patch xen-unstable.xentrace.empty_t_info_pages.patch xen-unstable.xentrace.verbose.patch xen-unstable.xentrace.no_gdprintk.patch xen-unstable.xentrace.comments.patch xen-unstable.xentrace.printk_prefix.patch xen-unstable.xentrace.remove_debug_printk.patch xen-unstable.xentrace.t_info_pages-formula.patch xen-unstable.xentrace.register_cpu_notifier-boot_time.patch xen-unstable.xentrace.t_info_page-overflow.patch xen-unstable.xentrace.t_info_first_offset.patch xen-unstable.xentrace.data_size__read_mostly.patch xen-unstable.xentrace.__insert_record-dst-type.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=124
74 lines
2.1 KiB
Diff
74 lines
2.1 KiB
Diff
Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
|
===================================================================
|
|
--- xen-4.1.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
|
+++ xen-4.1.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
|
@@ -360,6 +360,15 @@ static void qemu_send_responses(void* op
|
|
}
|
|
|
|
/**
|
|
+ * Callback function for AIO flush
|
|
+ */
|
|
+static void qemu_flush_response(void* opaque, int ret) {
|
|
+ if (ret != 0) {
|
|
+ DPRINTF("aio_flush: ret = %d (%s)\n", ret, strerror(-ret));
|
|
+ }
|
|
+}
|
|
+
|
|
+/**
|
|
* Callback function for the IO message pipe. Reads requests from the ring
|
|
* and processes them (call qemu read/write functions).
|
|
*
|
|
@@ -378,6 +387,7 @@ static void handle_blktap_iomsg(void* pr
|
|
blkif_t *blkif = s->blkif;
|
|
tapdev_info_t *info = s->ring_info;
|
|
int page_size = getpagesize();
|
|
+ int sync;
|
|
|
|
struct aiocb_info *aiocb_info;
|
|
|
|
@@ -410,7 +420,7 @@ static void handle_blktap_iomsg(void* pr
|
|
|
|
/* Don't allow writes on readonly devices */
|
|
if ((s->flags & TD_RDONLY) &&
|
|
- (req->operation == BLKIF_OP_WRITE)) {
|
|
+ (req->operation != BLKIF_OP_READ)) {
|
|
blkif->pending_list[idx].status = BLKIF_RSP_ERROR;
|
|
goto send_response;
|
|
}
|
|
@@ -431,7 +441,7 @@ static void handle_blktap_iomsg(void* pr
|
|
DPRINTF("Sector request failed:\n");
|
|
DPRINTF("%s request, idx [%d,%d] size [%llu], "
|
|
"sector [%llu,%llu]\n",
|
|
- (req->operation == BLKIF_OP_WRITE ?
|
|
+ (req->operation != BLKIF_OP_READ ?
|
|
"WRITE" : "READ"),
|
|
idx,i,
|
|
(long long unsigned)
|
|
@@ -444,8 +454,14 @@ static void handle_blktap_iomsg(void* pr
|
|
|
|
blkif->pending_list[idx].secs_pending += nsects;
|
|
|
|
- switch (req->operation)
|
|
+ sync = 0;
|
|
+ switch (req->operation)
|
|
{
|
|
+ case BLKIF_OP_WRITE_BARRIER:
|
|
+ sync = 1;
|
|
+ bdrv_aio_flush(s->bs, qemu_flush_response, NULL);
|
|
+ /* fall through */
|
|
+
|
|
case BLKIF_OP_WRITE:
|
|
aiocb_info = malloc(sizeof(*aiocb_info));
|
|
|
|
@@ -465,6 +481,10 @@ static void handle_blktap_iomsg(void* pr
|
|
DPRINTF("ERROR: bdrv_write() == NULL\n");
|
|
goto send_response;
|
|
}
|
|
+
|
|
+ if (sync)
|
|
+ bdrv_aio_flush(s->bs, qemu_flush_response, NULL);
|
|
+
|
|
break;
|
|
|
|
case BLKIF_OP_READ:
|