]> git.proxmox.com Git - pve-qemu-kvm.git/blobdiff - debian/patches/old/backup-run-flush-inside-coroutine.patch
refer to the new repository
[pve-qemu-kvm.git] / debian / patches / old / backup-run-flush-inside-coroutine.patch
diff --git a/debian/patches/old/backup-run-flush-inside-coroutine.patch b/debian/patches/old/backup-run-flush-inside-coroutine.patch
deleted file mode 100644 (file)
index 913eb08..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-run vma_writer_close_stream inside coroutine
-
-Newer qemu (> 2.2.0-rc2) runs pvebackup_complete_cb from main loop,
-
-But vma_writer_close_stream triggers an async write (flush), which uses qemu_coroutine_yield(). This only works if called from a coroutine.
-
-
-Index: new/blockdev.c
-===================================================================
---- new.orig/blockdev.c        2014-11-20 12:17:17.000000000 +0100
-+++ new/blockdev.c     2014-11-20 12:17:23.000000000 +0100
-@@ -2059,6 +2059,13 @@
-     }
- }
-+static void coroutine_fn backup_close_vma_stream(void *opaque)
-+{
-+    PVEBackupDevInfo *di = opaque;
-+
-+    vma_writer_close_stream(backup_state.vmaw, di->dev_id);
-+}
-+
- static void pvebackup_complete_cb(void *opaque, int ret)
- {
-     PVEBackupDevInfo *di = opaque;
-@@ -2076,7 +2083,8 @@
-     di->target = NULL;
-     if (backup_state.vmaw) {
--        vma_writer_close_stream(backup_state.vmaw, di->dev_id);
-+        Coroutine *co = qemu_coroutine_create(backup_close_vma_stream);
-+        qemu_coroutine_enter(co, di);
-     }
-     block_job_cb(bs, ret);
-Index: new/vma-writer.c
-===================================================================
---- new.orig/vma-writer.c      2014-11-20 12:17:17.000000000 +0100
-+++ new/vma-writer.c   2014-11-20 12:17:23.000000000 +0100
-@@ -706,6 +706,10 @@
-     int i;
-+    while (vmaw->co_writer) {
-+        aio_poll(qemu_get_aio_context(), true);
-+    }
-+
-     assert(vmaw->co_writer == NULL);
-     if (vmaw->cmd) {