mbox series

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

Message ID 20200326153628.4869-1-kwolf@redhat.com (mailing list archive)
Headers show
Series mirror: Fix hang (operation waiting for itself/circular dependency) | expand

Message

Kevin Wolf March 26, 2020, 3:36 p.m. UTC
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(-)

Comments

Eric Blake March 26, 2020, 3:53 p.m. UTC | #1
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>