]> git.proxmox.com Git - pve-qemu.git/blob - debian/patches/pve/0033-PVE-Backup-aquire-aio_context-before-calling-backup_.patch
bump version to 4.2.0-2
[pve-qemu.git] / debian / patches / pve / 0033-PVE-Backup-aquire-aio_context-before-calling-backup_.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Dietmar Maurer <dietmar@proxmox.com>
3 Date: Wed, 11 Mar 2020 13:00:56 +0100
4 Subject: [PATCH] PVE-Backup: aquire aio_context before calling
5 backup_job_create
6
7 And do not set target in same aoi_context as source, because
8 this is already done in bdrv_backup_top_append ...
9
10 Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
11 ---
12 pve-backup.c | 8 +++-----
13 1 file changed, 3 insertions(+), 5 deletions(-)
14
15 diff --git a/pve-backup.c b/pve-backup.c
16 index 9ae89fb679..38dd33e28b 100644
17 --- a/pve-backup.c
18 +++ b/pve-backup.c
19 @@ -757,17 +757,15 @@ static void coroutine_fn pvebackup_co_start(void *opaque)
20 PVEBackupDevInfo *di = (PVEBackupDevInfo *)l->data;
21 l = g_list_next(l);
22
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);
30
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);
34 +
35 + aio_context_release(aio_context);
36 +
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");
40 --
41 2.20.1
42