]> git.ipfire.org Git - thirdparty/qemu.git/commit
blockdev-backup: don't check aio_context too early
authorJohn Snow <jsnow@redhat.com>
Thu, 23 May 2019 17:06:39 +0000 (13:06 -0400)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 17 Sep 2019 19:38:18 +0000 (14:38 -0500)
commit2429dc4eea91b381ff67a4d25ea9f6bbfe87c784
treea08e82552081a850453e2521995db28fd8a75153
parentf8d98e2b6db347922972126decbd2f9bb95d8326
blockdev-backup: don't check aio_context too early

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 <aliang@redhat.com>
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1683498
Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20190523170643.20794-2-jsnow@redhat.com
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
(cherry picked from commit d81e1efbea7d19c2f142d300df56538c73800590)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
blockdev.c