|
|
22c213 |
From 619b3aac9790a7ca7c01846144395a318a9ab250 Mon Sep 17 00:00:00 2001
|
|
|
22c213 |
From: Kevin Wolf <kwolf@redhat.com>
|
|
|
22c213 |
Date: Wed, 8 Apr 2020 17:29:14 +0100
|
|
|
22c213 |
Subject: [PATCH 3/6] backup: don't acquire aio_context in backup_clean
|
|
|
22c213 |
|
|
|
22c213 |
RH-Author: Kevin Wolf <kwolf@redhat.com>
|
|
|
22c213 |
Message-id: <20200408172917.18712-4-kwolf@redhat.com>
|
|
|
22c213 |
Patchwork-id: 94596
|
|
|
22c213 |
O-Subject: [RHEL-AV-8.2.0 qemu-kvm PATCH 3/6] backup: don't acquire aio_context in backup_clean
|
|
|
22c213 |
Bugzilla: 1817621
|
|
|
22c213 |
RH-Acked-by: Eric Blake <eblake@redhat.com>
|
|
|
22c213 |
RH-Acked-by: Danilo de Paula <ddepaula@redhat.com>
|
|
|
22c213 |
RH-Acked-by: Max Reitz <mreitz@redhat.com>
|
|
|
22c213 |
|
|
|
22c213 |
From: Stefan Reiter <s.reiter@proxmox.com>
|
|
|
22c213 |
|
|
|
22c213 |
All code-paths leading to backup_clean (via job_clean) have the job's
|
|
|
22c213 |
context already acquired. The job's context is guaranteed to be the same
|
|
|
22c213 |
as the one used by backup_top via backup_job_create.
|
|
|
22c213 |
|
|
|
22c213 |
Since the previous logic effectively acquired the lock twice, this
|
|
|
22c213 |
broke cleanup of backups for disks using IO threads, since the BDRV_POLL_WHILE
|
|
|
22c213 |
in bdrv_backup_top_drop -> bdrv_do_drained_begin would only release the lock
|
|
|
22c213 |
once, thus deadlocking with the IO thread.
|
|
|
22c213 |
|
|
|
22c213 |
This is a partial revert of 0abf2581717a19.
|
|
|
22c213 |
|
|
|
22c213 |
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
|
|
|
22c213 |
Reviewed-by: Max Reitz <mreitz@redhat.com>
|
|
|
22c213 |
Message-Id: <20200407115651.69472-4-s.reiter@proxmox.com>
|
|
|
22c213 |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
22c213 |
(cherry picked from commit eca0f3524a4eb57d03a56b0cbcef5527a0981ce4)
|
|
|
22c213 |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
22c213 |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
22c213 |
---
|
|
|
22c213 |
block/backup.c | 4 ----
|
|
|
22c213 |
1 file changed, 4 deletions(-)
|
|
|
22c213 |
|
|
|
22c213 |
diff --git a/block/backup.c b/block/backup.c
|
|
|
22c213 |
index 1383e21..ec50946 100644
|
|
|
22c213 |
--- a/block/backup.c
|
|
|
22c213 |
+++ b/block/backup.c
|
|
|
22c213 |
@@ -135,11 +135,7 @@ static void backup_abort(Job *job)
|
|
|
22c213 |
static void backup_clean(Job *job)
|
|
|
22c213 |
{
|
|
|
22c213 |
BackupBlockJob *s = container_of(job, BackupBlockJob, common.job);
|
|
|
22c213 |
- AioContext *aio_context = bdrv_get_aio_context(s->backup_top);
|
|
|
22c213 |
-
|
|
|
22c213 |
- aio_context_acquire(aio_context);
|
|
|
22c213 |
bdrv_backup_top_drop(s->backup_top);
|
|
|
22c213 |
- aio_context_release(aio_context);
|
|
|
22c213 |
}
|
|
|
22c213 |
|
|
|
22c213 |
void backup_do_checkpoint(BlockJob *job, Error **errp)
|
|
|
22c213 |
--
|
|
|
22c213 |
1.8.3.1
|
|
|
22c213 |
|