1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Dietmar Maurer <dietmar@proxmox.com>
3 Date: Mon, 6 Apr 2020 12:17:00 +0200
4 Subject: [PATCH] PVE-Backup: aquire aio_context before calling
7 And do not set target in same aoi_context as source, because
8 this is already done in bdrv_backup_top_append ...
10 Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
12 pve-backup.c | 8 +++-----
13 1 file changed, 3 insertions(+), 5 deletions(-)
15 diff --git a/pve-backup.c b/pve-backup.c
16 index 9ae89fb679..38dd33e28b 100644
19 @@ -757,17 +757,15 @@ static void coroutine_fn pvebackup_co_start(void *opaque)
20 PVEBackupDevInfo *di = (PVEBackupDevInfo *)l->data;
23 - // make sure target runs in same aoi_context as source
24 AioContext *aio_context = bdrv_get_aio_context(di->bs);
25 aio_context_acquire(aio_context);
26 - GSList *ignore = NULL;
27 - bdrv_set_aio_context_ignore(di->target, aio_context, &ignore);
28 - g_slist_free(ignore);
29 - aio_context_release(aio_context);
31 job = backup_job_create(NULL, di->bs, di->target, backup_state.speed, MIRROR_SYNC_MODE_FULL, NULL,
32 BITMAP_SYNC_MODE_NEVER, false, NULL, BLOCKDEV_ON_ERROR_REPORT, BLOCKDEV_ON_ERROR_REPORT,
33 JOB_DEFAULT, pvebackup_complete_cb, di, 1, NULL, &local_err);
35 + aio_context_release(aio_context);
37 if (!job || local_err != NULL) {
38 qemu_co_rwlock_wrlock(&backup_state.stat.rwlock);
39 error_setg(&backup_state.stat.error, "backup_job_create failed");