[PATCH v2 0/2] mirror: Fix hang (operation waiting for itself/circular dependency)

Kevin Wolf posted 2 patches 4 years, 1 month ago
Test asan passed
Test docker-mingw@fedora passed
Test FreeBSD passed
Test docker-quick@centos7 passed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200326153628.4869-1-kwolf@redhat.com
Maintainers: Max Reitz <mreitz@redhat.com>, John Snow <jsnow@redhat.com>, Kevin Wolf <kwolf@redhat.com>
block/mirror.c | 30 +++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)
[PATCH v2 0/2] mirror: Fix hang (operation waiting for itself/circular dependency)
Posted by Kevin Wolf 4 years, 1 month ago
The recent fix didn't actually fix the whole problem. Operations can't
only wait for themselves, but we can also end up with circular
dependencies like two operations waiting for each other to complete.

This reverts the first fix and implements another approach.

v2:
- Mark active mirror operations as in-flight, too

Kevin Wolf (2):
  Revert "mirror: Don't let an operation wait for itself"
  mirror: Wait only for in-flight operations

 block/mirror.c | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)

-- 
2.20.1


Re: [PATCH v2 0/2] mirror: Fix hang (operation waiting for itself/circular dependency)
Posted by Eric Blake 4 years, 1 month ago
On 3/26/20 10:36 AM, Kevin Wolf wrote:
> The recent fix didn't actually fix the whole problem. Operations can't
> only wait for themselves, but we can also end up with circular
> dependencies like two operations waiting for each other to complete.
> 
> This reverts the first fix and implements another approach.
> 
> v2:
> - Mark active mirror operations as in-flight, too
> 
> Kevin Wolf (2):
>    Revert "mirror: Don't let an operation wait for itself"
>    mirror: Wait only for in-flight operations

Series:
Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org