From: Max Reitz <mreitz@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Cc: famz@redhat.com, slp@redhat.com, qemu-devel@nongnu.org,
pbonzini@redhat.com
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v3 13/19] block: Remove aio_poll() in bdrv_drain_poll variants
Date: Mon, 28 Jan 2019 21:13:15 +0100 [thread overview]
Message-ID: <d4de9cce-c8fb-b400-202b-fcec821fd804@redhat.com> (raw)
In-Reply-To: <20180920161958.27453-14-kwolf@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1912 bytes --]
On 20.09.18 18:19, Kevin Wolf wrote:
> bdrv_drain_poll_top_level() was buggy because it didn't release the
> AioContext lock of the node to be drained before calling aio_poll().
> This way, callbacks called by aio_poll() would possibly take the lock a
> second time and run into a deadlock with a nested AIO_WAIT_WHILE() call.
>
> However, it turns out that the aio_poll() call isn't actually needed any
> more. It was introduced in commit 91af091f923, which is effectively
> reverted by this patch. The cases it was supposed to fix are now covered
> by bdrv_drain_poll(), which waits for block jobs to reach a quiescent
> state.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> Reviewed-by: Fam Zheng <famz@redhat.com>
> Reviewed-by: Max Reitz <mreitz@redhat.com>
> ---
> block/io.c | 8 --------
> 1 file changed, 8 deletions(-)
Hm... While looking at iotest 129 (which I think is broken because it
tries to use BB-level throttling which doesn't do anything for the
mirror job), I noticed this:
$ x86_64-softmmu/qemu-system-x86_64 \
-object throttle-group,id=tg0 \
-drive node-name=node0,driver=throttle,\
throttle-group=tg0,file.driver=qcow2,file.file.driver=file,\
file.file.filename=/tmp/src.qcow2 -qmp stdio \
<<EOF
{"execute":"qmp_capabilities"}
{"execute":"drive-mirror","arguments":{"device":"node0",
"target":"/tmp/tgt.qcow2","sync":"full","format":"qcow2",
"mode":"absolute-paths","job-id":"mirror-job0"}}
{"execute":"block-job-cancel",
"arguments":{"device":"mirror-job0","force":true}}
{"execute":"quit"}
EOF
[...]
qemu-system-x86_64: block/block-backend.c:2211: blk_root_drained_end:
Assertion `blk->quiesce_counter' failed.
[1] 2722 abort (core dumped) x86_64-softmmu/qemu-system-x86_64
-object throttle-group,id=tg0 -drive -qmp
(Which worked before commit 4cf077b59fc73eec29f8b7d082919dbb278bdc86,
i.e. this one.)
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
parent reply other threads:[~2019-01-28 20:13 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20180920161958.27453-14-kwolf@redhat.com>]
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=d4de9cce-c8fb-b400-202b-fcec821fd804@redhat.com \
--to=mreitz@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=slp@redhat.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).