From 4de872af5f176bbcc0d2f19b9fd30a7cefbddd9a Mon Sep 17 00:00:00 2001
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
Date: Wed, 9 Dec 2015 15:41:13 +0100
Subject: [PATCH 21/48] backup: do not use bdrv_drain_all

---
 blockdev.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/blockdev.c b/blockdev.c
index a9a900e..36b4083 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -3135,9 +3135,6 @@ static void pvebackup_cancel(void *opaque)
         vma_writer_set_error(backup_state.vmaw, "backup cancelled");
     }
 
-    /* drain all i/o (awake jobs waiting for aio) */
-    bdrv_drain_all();
-
     GList *l = backup_state.di_list;
     while (l) {
         PVEBackupDevInfo *di = (PVEBackupDevInfo *)l->data;
@@ -3146,8 +3143,7 @@ static void pvebackup_cancel(void *opaque)
             BlockJob *job = di->bs->job;
             if (job) {
                 if (!di->completed) {
-                     block_job_cancel_sync(job);
-                     bdrv_drain_all(); /* drain all i/o (awake jobs waiting for aio) */
+                    block_job_cancel_sync(job);
                 }
             }
         }
-- 
2.1.4

