]> git.ipfire.org Git - thirdparty/qemu.git/commit
qcow2: Always execute preallocate() in a coroutine
authorMax Reitz <mreitz@redhat.com>
Mon, 9 Oct 2017 21:55:32 +0000 (23:55 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 6 Dec 2017 01:40:38 +0000 (19:40 -0600)
commit39475b880538cbf4eeba0affd4e10486839be4b2
tree216d7f0d61b28d369bcc5ea78394336ede307767
parenta25aca75f83895fd16bef572bbf31e33620b600d
qcow2: Always execute preallocate() in a coroutine

Some qcow2 functions (at least perform_cow()) expect s->lock to be
taken.  Therefore, if we want to make use of them, we should execute
preallocate() (as "preallocate_co") in a coroutine so that we can use
the qemu_co_mutex_* functions.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-id: 20171009215533.12530-3-mreitz@redhat.com
Cc: qemu-stable@nongnu.org
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
(cherry picked from commit 572b07bea1d1a0f7726fd95c2613c76002a379bc)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/qcow2.c