From: John Snow <jsnow@redhat.com>
To: Alberto Garcia <berto@igalia.com>, Kevin Wolf <kwolf@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
Eric Blake <eblake@redhat.com>, Max Reitz <mreitz@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH v11 01/19] block: Add bdrv_drain_all_{begin, end}()
Date: Fri, 21 Oct 2016 14:55:51 -0400 [thread overview]
Message-ID: <c25f76ec-19f6-0872-c134-93306da817a7@redhat.com> (raw)
In-Reply-To: <w51shrrpgud.fsf@maestria.local.igalia.com>
On 10/20/2016 04:25 AM, Alberto Garcia wrote:
> On Wed 19 Oct 2016 07:11:20 PM CEST, Kevin Wolf wrote:
>
>>> bdrv_drain_all() doesn't allow the caller to do anything after all
>>> pending requests have been completed but before block jobs are
>>> resumed.
>>>
>>> This patch splits bdrv_drain_all() into _begin() and _end() for that
>>> purpose. It also adds aio_{disable,enable}_external() calls to
>>> disable external clients in the meantime.
>>>
>>> Signed-off-by: Alberto Garcia <berto@igalia.com>
>>
>> This looks okay as a first step, possibly enough for this series
>> (we'll have to review this carefully), but it leaves us with a rather
>> limited version of bdrv_drain_all_begin/end that excludes many useful
>> cases. One of them is that John wants to use it around QMP
>> transactions.
>>
>> Specifically, you can't add a new BDS or a new block job in a
>> drain_all section because then bdrv_drain_all_end() would try to
>> unpause the new thing even though it has never been paused. Depending
>> on what else we did with it, this will either corrupt the pause
>> counters or just directly fail an assertion.
>
> The problem is: do you want to be able to create a new block job and let
> it run? Because then you can end up having the same problem that this
> patch is trying to prevent if the new job attempts to reopen a
> BlockDriverState.
>
> Berto
>
The plan was to create jobs in a pre-started mode and only to engage
them after the drained section. Do any jobs re-open a BDS prior to the
creation of their coroutine?
--js
next prev parent reply other threads:[~2016-10-21 18:55 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-14 13:08 [Qemu-devel] [PATCH v11 00/19] Support streaming to an intermediate layer Alberto Garcia
2016-10-14 13:08 ` [Qemu-devel] [PATCH v11 01/19] block: Add bdrv_drain_all_{begin, end}() Alberto Garcia
2016-10-15 7:28 ` Paolo Bonzini
2016-10-19 17:11 ` Kevin Wolf
2016-10-20 8:25 ` Alberto Garcia
2016-10-20 9:11 ` Kevin Wolf
2016-10-21 18:55 ` John Snow [this message]
2016-10-21 19:03 ` Alberto Garcia
2016-10-21 19:34 ` John Snow
2016-10-24 10:53 ` Paolo Bonzini
2016-10-25 13:39 ` Alberto Garcia
2016-10-25 13:53 ` Paolo Bonzini
2016-10-25 14:38 ` Kevin Wolf
2016-10-25 14:41 ` Paolo Bonzini
2016-10-25 15:03 ` Kevin Wolf
2016-10-25 14:48 ` Alberto Garcia
2016-10-25 14:52 ` Paolo Bonzini
2016-10-14 13:08 ` [Qemu-devel] [PATCH v11 02/19] block: Pause all jobs during bdrv_reopen_multiple() Alberto Garcia
2016-10-15 7:28 ` Paolo Bonzini
2016-10-14 13:08 ` [Qemu-devel] [PATCH v11 03/19] block: Add block_job_add_bdrv() Alberto Garcia
2016-10-14 13:08 ` [Qemu-devel] [PATCH v11 04/19] block: Use block_job_add_bdrv() in mirror_start_job() Alberto Garcia
2016-10-14 13:08 ` [Qemu-devel] [PATCH v11 05/19] block: Use block_job_add_bdrv() in backup_start() Alberto Garcia
2016-10-14 13:08 ` [Qemu-devel] [PATCH v11 06/19] block: Check blockers in all nodes involved in a block-commit job Alberto Garcia
2016-10-14 13:08 ` [Qemu-devel] [PATCH v11 07/19] block: Block all nodes involved in the block-commit operation Alberto Garcia
2016-10-14 13:08 ` [Qemu-devel] [PATCH v11 08/19] block: Block all intermediate nodes in commit_active_start() Alberto Garcia
2016-10-14 13:08 ` [Qemu-devel] [PATCH v11 09/19] block: Support streaming to an intermediate layer Alberto Garcia
2016-10-14 13:08 ` [Qemu-devel] [PATCH v11 10/19] block: Add QMP support for " Alberto Garcia
2016-10-14 13:08 ` [Qemu-devel] [PATCH v11 11/19] docs: Document how to stream " Alberto Garcia
2016-10-14 13:08 ` [Qemu-devel] [PATCH v11 12/19] qemu-iotests: Test streaming " Alberto Garcia
2016-10-14 13:08 ` [Qemu-devel] [PATCH v11 13/19] qemu-iotests: Test block-stream operations in parallel Alberto Garcia
2016-10-14 13:08 ` [Qemu-devel] [PATCH v11 14/19] qemu-iotests: Test overlapping stream and commit operations Alberto Garcia
2016-10-14 13:08 ` [Qemu-devel] [PATCH v11 15/19] qemu-iotests: Test block-stream and block-commit in parallel Alberto Garcia
2016-10-14 13:08 ` [Qemu-devel] [PATCH v11 16/19] qemu-iotests: Add iotests.supports_quorum() Alberto Garcia
2016-10-14 13:08 ` [Qemu-devel] [PATCH v11 17/19] qemu-iotests: Test streaming to a Quorum child Alberto Garcia
2016-10-14 13:08 ` [Qemu-devel] [PATCH v11 18/19] block: Add 'base-node' parameter to the 'block-stream' command Alberto Garcia
2016-10-14 13:08 ` [Qemu-devel] [PATCH v11 19/19] qemu-iotests: Test the 'base-node' parameter of 'block-stream' Alberto Garcia
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=c25f76ec-19f6-0872-c134-93306da817a7@redhat.com \
--to=jsnow@redhat.com \
--cc=armbru@redhat.com \
--cc=berto@igalia.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@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).