All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Alberto Garcia <berto@igalia.com>, Max Reitz <mreitz@redhat.com>,
	qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 4/6] block: Support streaming to an intermediate layer
Date: Thu, 16 Apr 2015 06:27:39 -0600	[thread overview]
Message-ID: <552FAABB.5010403@redhat.com> (raw)
In-Reply-To: <w514moge7p0.fsf@maestria.local.igalia.com>

On 04/16/2015 03:36 AM, Alberto Garcia wrote:
> On Wed 15 Apr 2015 06:09:18 PM CEST, Max Reitz wrote:
> 
>>> +    orig_bs_flags = bdrv_get_flags(bs);
>>> +    if (!(orig_bs_flags & BDRV_O_RDWR)) {
>>
>> I feel like we don't want to do this if we're not streaming to an
>> intermediate layer but to the top layer (because that means there is
>> some reason for the BDS to be read-only beyond it just being a backing
>> BDS).
> 
> I didn't think about this... that I can fix easily, but I wonder what's
> the scenario where the top layer is read-only.

Suppose I tell qemu to open the chain 'base <- mid <- top' read-only,
and then later decide to stream base into mid or top. It should be fine
from the guest's perspective to keep the guest in read-only mode, while
still using streaming to reduce the chain.


> 
>> But then again, it probably won't hurt and I don't really want to
>> think about the implications of trying to run a block-commit or a
>> separate block-stream on the chain...
> 
> I actually tried with scenarios such as A>B>C>D>E, streaming from B to E
> and from A to C simultaneously, and it seems to work (at least I didn't
> see any obvious problems), but I don't think we want to support that
> because a) I don't see the use case and b) we're likely opening a can of
> worms.

Streaming doesn't corrupt any part of the chain, so I think you are safe
doing overlapping streams like that.  However, I also agree that it is
not worth supporting, and that we are safer not allowing overlapping
streams.

> 
> What we can do is stream from A to C and from D to E at the same time,
> that would be allowed with these patches and I don't see any obvious
> reason why it would fail.

Correct - that's not overlapping, so it should not be forbidden, as long
as parallel jobs are working well.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

  reply	other threads:[~2015-04-16 12:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 14:43 [Qemu-devel] [PATCH v3 0/6] Support streaming to an intermediate layer Alberto Garcia
2015-04-08 14:43 ` [Qemu-devel] [PATCH 1/6] block: keep a list of block jobs Alberto Garcia
2015-04-15 14:29   ` [Qemu-devel] [Qemu-block] " Max Reitz
2015-04-08 14:43 ` [Qemu-devel] [PATCH 2/6] block: allow block jobs in any arbitrary node Alberto Garcia
2015-04-15 15:22   ` [Qemu-devel] [Qemu-block] " Max Reitz
2015-04-16  8:20     ` Alberto Garcia
2015-04-08 14:43 ` [Qemu-devel] [PATCH 3/6] block: never cancel a streaming job without running stream_complete() Alberto Garcia
2015-04-15 15:29   ` [Qemu-devel] [Qemu-block] " Max Reitz
2015-04-08 14:43 ` [Qemu-devel] [PATCH 4/6] block: Support streaming to an intermediate layer Alberto Garcia
2015-04-15 16:09   ` [Qemu-devel] [Qemu-block] " Max Reitz
2015-04-16  9:36     ` Alberto Garcia
2015-04-16 12:27       ` Eric Blake [this message]
2015-04-16 12:34         ` Alberto Garcia
2015-04-17  8:02           ` Kevin Wolf
2015-04-16 14:30     ` Alberto Garcia
2015-04-17 12:46       ` Max Reitz
2015-04-08 14:43 ` [Qemu-devel] [PATCH 5/6] block: Add QMP support for " Alberto Garcia
2015-04-15 16:17   ` [Qemu-devel] [Qemu-block] " Max Reitz
2015-04-08 14:43 ` [Qemu-devel] [PATCH 6/6] docs: Document how to stream " Alberto Garcia
2015-04-15 16:25   ` [Qemu-devel] [Qemu-block] " Max Reitz
2015-04-15 16:27 ` [Qemu-devel] [Qemu-block] [PATCH v3 0/6] Support streaming " Max Reitz

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=552FAABB.5010403@redhat.com \
    --to=eblake@redhat.com \
    --cc=berto@igalia.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.