qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, vsementsov@virtuozzo.com,
	qemu-devel@nongnu.org, mreitz@redhat.com, den@openvz.org
Subject: [PATCH for-5.1? 0/3] Fix nbd reconnect dead-locks
Date: Mon, 20 Jul 2020 12:00:21 +0300	[thread overview]
Message-ID: <20200720090024.18186-1-vsementsov@virtuozzo.com> (raw)

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(-)

-- 
2.21.0



             reply	other threads:[~2020-07-20  9:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20  9:00 Vladimir Sementsov-Ogievskiy [this message]
2020-07-20  9:00 ` [PATCH 1/3] block/nbd: allow drain during reconnect attempt Vladimir Sementsov-Ogievskiy
2020-07-20  9:02   ` Vladimir Sementsov-Ogievskiy
2020-07-23 18:47   ` Eric Blake
2020-07-24 10:04     ` Vladimir Sementsov-Ogievskiy
2020-07-24 11:50     ` Vladimir Sementsov-Ogievskiy
2020-07-24  9:49   ` Vladimir Sementsov-Ogievskiy
2020-07-24 10:21   ` Vladimir Sementsov-Ogievskiy
2020-07-20  9:00 ` [PATCH 2/3] block/nbd: on shutdown terminate connection attempt Vladimir Sementsov-Ogievskiy
2020-07-23 18:52   ` Eric Blake
2020-07-20  9:00 ` [PATCH 3/3] block/nbd: nbd_co_reconnect_loop(): don't sleep if drained Vladimir Sementsov-Ogievskiy
2020-07-23 18:55   ` Eric Blake
2020-07-27 18:42     ` Vladimir Sementsov-Ogievskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200720090024.18186-1-vsementsov@virtuozzo.com \
    --to=vsementsov@virtuozzo.com \
    --cc=den@openvz.org \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).