xen/ioemu-blktap-barriers.patch
Charles Arnold 9a05aa7fc4 - bnc#658704 - SLES11 SP1 Xen boot panic in x2apic mode
22707-x2apic-preenabled-check.patch
- bnc#641419 - L3: Xen: qemu-dm reports "xc_map_foreign_batch: mmap failed:
  Cannot allocate memory"
  7434-qemu-rlimit-as.patch
- Additional or upstream patches from Jan
  22693-fam10-mmio-conf-base-protect.patch
  22694-x86_64-no-weak.patch
  22708-xenctx-misc.patch
  21432-4.0-cpu-boot-failure.patch
  22645-amd-flush-filter.patch
  qemu-fix-7433.patch

- Maintain compatibility with the extid flag even though it is
  deprecated for both legacy and sxp config files.
  hv_extid_compatibility.patch 

- bnc#649209-improve suspend eventchn lock
  suspend_evtchn_lock.patch

- Removed the hyper-v shim patches in favor of using the upstream 
  version. 

- bnc#641419 - L3: Xen: qemu-dm reports "xc_map_foreign_batch: mmap
  failed: Cannot allocate memory" 
  qemu-rlimit-as.patch

- Upstream c/s 7433 to replace qemu_altgr_more.patch
  7433-qemu-altgr.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=90
2011-01-14 18:24:51 +00:00

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: