aboutsummaryrefslogtreecommitdiff
path: root/block/qcow2.h
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2020-03-26 16:36:28 +0100
committerKevin Wolf <kwolf@redhat.com>2020-03-27 14:47:23 +0100
commitce8cabbd17cf738ddfc68384440c38e5dd2fdf97 (patch)
tree67b8b26517396b48ba468d471810e32883652402 /block/qcow2.h
parent9178f4fe5f083064f5c91f04d98c815ce5a5af1c (diff)
downloadqemu-ce8cabbd17cf738ddfc68384440c38e5dd2fdf97.zip
qemu-ce8cabbd17cf738ddfc68384440c38e5dd2fdf97.tar.gz
qemu-ce8cabbd17cf738ddfc68384440c38e5dd2fdf97.tar.bz2
mirror: Wait only for in-flight operations
mirror_wait_for_free_in_flight_slot() just picks a random operation to wait for. However, a MirrorOp is already in s->ops_in_flight when mirror_co_read() waits for free slots, so if not enough slots are immediately available, an operation can end up waiting for itself, or two or more operations can wait for each other to complete, which results in a hang. Fix this by adding a flag to MirrorOp that tells us if the request is already in flight (and therefore occupies slots that it will later free), and picking only such operations for waiting. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1794692 Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20200326153628.4869-3-kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow2.h')
0 files changed, 0 insertions, 0 deletions