qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Alberto Garcia <berto@igalia.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org,
	Eric Blake <eblake@redhat.com>, Max Reitz <mreitz@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	jsnow@redhat.com
Subject: Re: [Qemu-devel] [PATCH v11 01/19] block: Add bdrv_drain_all_{begin, end}()
Date: Tue, 25 Oct 2016 17:03:19 +0200	[thread overview]
Message-ID: <20161025150319.GM4695@noname.str.redhat.com> (raw)
In-Reply-To: <f5fde605-1b6a-7ea4-bfdc-664de1a611e9@redhat.com>

Am 25.10.2016 um 16:41 hat Paolo Bonzini geschrieben:
> 
> 
> On 25/10/2016 16:38, Kevin Wolf wrote:
> > Am 25.10.2016 um 15:53 hat Paolo Bonzini geschrieben:
> >>
> >>
> >> On 25/10/2016 15:39, Alberto Garcia wrote:
> >>> On Mon 24 Oct 2016 12:53:41 PM CEST, Paolo Bonzini wrote:
> >>>
> >>>>> My first thoughts were about how to let an unpause succeed without a
> >>>>> previous pause for these objects, but actually I think this isn't
> >>>>> what we should do. We rather want to actually do the pause instead
> >>>>> because even new BDSes and block jobs should probably start in a
> >>>>> quiesced state when created inside a drain_all section.
> >>>>
> >>>> Yes, I agree with this.  It shouldn't be too hard to implement it.  It
> >>>> would require a BlockDriverState to look at the global "inside
> >>>> bdrv_drain_all_begin" state, and ask its BlockBackend to disable
> >>>> itself upon bdrv_replace_child.
> >>>
> >>> Why in bdrv_replace_child()? bdrv_drain_all_end() enables all BDSs, but
> >>> if you add one with "blockdev-add" it's not going to be disabled using
> >>> this method.
> >>
> >> You only need to disable it when blk_insert_bs is called.  In fact...
> > 
> > This assumes that the block driver doesn't issue internal background I/O
> > by itself. Probably true for everything that we have today, but it would
> > probably be cleaner to quiesce it directly in bdrv_open_common().
> 
> So
> 
> 	bs->quiesce_counter = all_quiesce_counter;
> 
> ?  That would work.

Yes, that's what I had in mind.

> Should bdrv_close assert bs->quiesce_counter==0
> (which implies all_quiesce_counter == 0), since it usually has to do I/O?

Hm... Not sure about that. We're still using bdrv_drain_all_begin/end as
a function to isolate the BDSes, so some I/O from the caller of
drain_all is expected, and that could involve deleting a BDS.

But once we fully implemented what you proposed, probably yes.

Kevin

  reply	other threads:[~2016-10-25 15:03 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
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 [this message]
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=20161025150319.GM4695@noname.str.redhat.com \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berto@igalia.com \
    --cc=eblake@redhat.com \
    --cc=jsnow@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).