qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH 4/6] block: Support streaming to an


From: Eric Blake
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH 4/6] block: Support streaming to an intermediate layer
Date: Thu, 16 Apr 2015 06:27:39 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

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 via email to

[Prev in Thread] Current Thread [Next in Thread]