mbox series

[for-5.1?,0/3] Fix nbd reconnect dead-locks

Message ID 20200720090024.18186-1-vsementsov@virtuozzo.com
Headers show
Series Fix nbd reconnect dead-locks | expand

Message

Vladimir Sementsov-Ogievskiy July 20, 2020, 9 a.m. UTC
Hi all!

I've found some dead-locks, which can be easily triggered on master
branch with default nbd configuration (reconnect-delay is 0),
here are fixes.

01-02 fix real dead-locks 
03 - hm. I'm not sure that the problem is reachable on master, I've
faced it in my development branch where I move initial connect into
coroutine and introduce non-blocking connect. So consider it as an
intuitive fix. It just makes code a bit better.

Vladimir Sementsov-Ogievskiy (3):
  block/nbd: allow drain during reconnect attempt
  block/nbd: on shutdown terminate connection attempt
  block/nbd: nbd_co_reconnect_loop(): don't sleep if drained

 block/nbd.c | 36 +++++++++++++++++++++++++++---------
 1 file changed, 27 insertions(+), 9 deletions(-)