From: Dietmar Maurer <dietmar@proxmox.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-block@nongnu.org,
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Stefan Hajnoczi <stefanha@redhat.com>,
Max Reitz <mreitz@redhat.com>
Subject: Re: bdrv_drained_begin deadlock with io-threads
Date: Fri, 3 Apr 2020 18:31:35 +0200 (CEST) [thread overview]
Message-ID: <1466731307.175.1585931495885@webmail.proxmox.com> (raw)
In-Reply-To: <20200403084729.GB5336@linux.fritz.box>
> On April 3, 2020 10:47 AM Kevin Wolf <kwolf@redhat.com> wrote:
>
>
> Am 03.04.2020 um 10:26 hat Dietmar Maurer geschrieben:
> > > With the following patch, it seems to survive for now. I'll give it some
> > > more testing tomorrow (also qemu-iotests to check that I didn't
> > > accidentally break something else.)
> >
> > Wow, that was fast! Seems your patch fixes the bug!
> >
> > I wonder what commit introduced that problem, maybe:
> >
> > https://github.com/qemu/qemu/commit/cf3129323f900ef5ddbccbe86e4fa801e88c566e#diff-7cb66df56045598b75a219eebc27efb6
> >
> > If so, version 4.1.X in not affected by this bug, but 4.2.0 and later?
>
> Yes, I'm pretty sure that's the one.
I also wonder if we can loose an aio_wait_kick() by directly accessing blk->in_flight.
I thought this should use atomic_mb_read()?
diff --git a/block/block-backend.c b/block/block-backend.c
index 8b8f2a80a0..48f3721505 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -2275,7 +2275,7 @@ static bool blk_root_drained_poll(BdrvChild *child)
{
BlockBackend *blk = child->opaque;
assert(blk->quiesce_counter);
- return !!blk->in_flight;
+ return !!atomic_mb_read(&blk->in_flight);
}
static void blk_root_drained_end(BdrvChild *child, int *drained_end_counter)
next prev parent reply other threads:[~2020-04-03 16:32 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-31 8:46 bdrv_drained_begin deadlock with io-threads Dietmar Maurer
2020-03-31 9:17 ` Dietmar Maurer
2020-03-31 9:33 ` Dietmar Maurer
2020-03-31 12:58 ` Kevin Wolf
2020-03-31 14:32 ` Dietmar Maurer
2020-03-31 14:53 ` Vladimir Sementsov-Ogievskiy
2020-03-31 15:24 ` Dietmar Maurer
2020-03-31 15:37 ` Kevin Wolf
2020-03-31 16:18 ` Dietmar Maurer
2020-04-01 10:37 ` Kevin Wolf
2020-04-01 15:37 ` Dietmar Maurer
2020-04-01 15:50 ` Dietmar Maurer
2020-04-01 18:12 ` Kevin Wolf
2020-04-01 18:28 ` Dietmar Maurer
2020-04-01 18:44 ` Kevin Wolf
2020-04-02 6:48 ` Dietmar Maurer
2020-04-02 9:10 ` Dietmar Maurer
2020-04-02 12:14 ` Kevin Wolf
2020-04-02 14:25 ` Kevin Wolf
2020-04-02 15:40 ` Dietmar Maurer
2020-04-02 16:47 ` Kevin Wolf
2020-04-02 17:10 ` Kevin Wolf
2020-04-03 6:48 ` Thomas Lamprecht
2020-04-03 8:26 ` Dietmar Maurer
2020-04-03 8:47 ` Kevin Wolf
2020-04-03 16:31 ` Dietmar Maurer [this message]
2020-04-06 8:31 ` Kevin Wolf
2020-04-02 15:44 ` Dietmar Maurer
2020-04-01 18:35 ` Kevin Wolf
2020-04-02 9:21 ` Dietmar Maurer
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=1466731307.175.1585931495885@webmail.proxmox.com \
--to=dietmar@proxmox.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=vsementsov@virtuozzo.com \
/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).