[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 16/97] blockdev-backup: don't check aio_context too early
From: |
Michael Roth |
Subject: |
[PATCH 16/97] blockdev-backup: don't check aio_context too early |
Date: |
Tue, 1 Oct 2019 18:44:55 -0500 |
From: John Snow <address@hidden>
in blockdev_backup_prepare, we check to make sure that the target is
associated with a compatible aio context. However, do_blockdev_backup is
called later and has some logic to move the target to a compatible
aio_context. The transaction version will fail certain commands
needlessly early as a result.
Allow blockdev_backup_prepare to simply call do_blockdev_backup, which
will ultimately decide if the contexts are compatible or not.
Note: the transaction version has always disallowed this operation since
its initial commit bd8baecd (2014), whereas the version of
qmp_blockdev_backup at the time, from commit c29c1dd312f, tried to
enforce the aio_context switch instead. It's not clear, and I can't see
from the mailing list archives at the time, why the two functions take a
different approach. It wasn't until later in efd7556708b (2016) that the
standalone version tried to determine if it could set the context or
not.
Reported-by: aihua liang <address@hidden>
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1683498
Signed-off-by: John Snow <address@hidden>
Message-id: address@hidden
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
(cherry picked from commit d81e1efbea7d19c2f142d300df56538c73800590)
Signed-off-by: Michael Roth <address@hidden>
---
blockdev.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 4775a07d93..d358169995 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1871,10 +1871,6 @@ static void blockdev_backup_prepare(BlkActionState
*common, Error **errp)
}
aio_context = bdrv_get_aio_context(bs);
- if (aio_context != bdrv_get_aio_context(target)) {
- error_setg(errp, "Backup between two IO threads is not implemented");
- return;
- }
aio_context_acquire(aio_context);
state->bs = bs;
--
2.17.1
- [PATCH 00/97] Patch Round-up for stable 4.0.1, freeze on 2019-10-10, Michael Roth, 2019/10/01
- [PATCH 01/97] qcow2: Avoid COW during metadata preallocation, Michael Roth, 2019/10/01
- [PATCH 22/97] iotests.py: rewrite run_job to be pickier, Michael Roth, 2019/10/01
- [PATCH 11/97] kbd-state: fix autorepeat handling, Michael Roth, 2019/10/01
- [PATCH 15/97] s390x/cpumodel: ignore csske for expansion, Michael Roth, 2019/10/01
- [PATCH 21/97] iotests.py: Fix VM.run_job, Michael Roth, 2019/10/01
- [PATCH 16/97] blockdev-backup: don't check aio_context too early,
Michael Roth <=
- [PATCH 12/97] usb-tablet: fix serial compat property, Michael Roth, 2019/10/01
- [PATCH 14/97] iotests: Test unaligned raw images with O_DIRECT, Michael Roth, 2019/10/01
- [PATCH 24/97] migration/dirty-bitmaps: change bitmap enumeration method, Michael Roth, 2019/10/01
- [PATCH 18/97] iotests: Test commit job start with concurrent I/O, Michael Roth, 2019/10/01
- [PATCH 13/97] block/file-posix: Unaligned O_DIRECT block-status, Michael Roth, 2019/10/01
- [PATCH 20/97] QEMUMachine: add events_wait method, Michael Roth, 2019/10/01
- [PATCH 25/97] vhost: fix vhost_log size overflow during migration, Michael Roth, 2019/10/01
- [PATCH 37/97] usbredir: fix buffer-overflow on vmload, Michael Roth, 2019/10/01
- [PATCH 34/97] target/i386: define md-clear bit, Michael Roth, 2019/10/01
- [PATCH 02/97] qcow2: Add errp to preallocate_co(), Michael Roth, 2019/10/01