5a49a4e63b
22045-python27-compat.patch Thu Nov 11 18:44:48 CST 2010 - cyliu@novell.com - bnc#641144 - FV Xen VM running windows or linux cannot write to virtual floppy drive bdrv_default_rwflag.patch - fate#310510 - fix xenpaging xenpaging.optimize_p2m_mem_paging_populate.patch xenpaging.HVMCOPY_gfn_paged_out.patch - bnc#649864 - automatic numa cpu placement of xen conflicts with cpupools 22326-cpu-pools-numa-placement.patch - fate#310510 - fix xenpaging xenpaging.populate_only_if_paged.patch - revert logic, populate needs to happen unconditionally xenpaging.p2m_mem_paging_populate_if_p2m_ram_paged.patch - invalidate current mfn only if gfn is not in flight or done xenpaging.mem_event_check_ring-free_requests.patch - print info only if 1 instead of 2 slots are free xenpaging.guest_remove_page.patch - check mfn before usage in resume function xenpaging.machine_to_phys_mapping.patch - check mfn before usage in resume function - bnc#552115 - Remove target discovery in block-iscsi OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=82
74 lines
2.1 KiB
Diff
74 lines
2.1 KiB
Diff
Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
|
===================================================================
|
|
--- 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
|
|
@@ -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:
|