Am 30.06.2011 13:48, schrieb Stefan Hajnoczi:
> On Wed, Jun 29, 2011 at 4:41 PM, Marcelo Tosatti <mtosa...@redhat.com> wrote:
>> On Wed, Jun 29, 2011 at 11:08:23AM +0100, Stefan Hajnoczi wrote:
>>> In the future we could add a 'base' argument to block_stream.  If base
>>> is specified then data contained in the base image will not be copied.
>>
>> This is a present requirement.
> 
> It's not one that I have had in the past but it is a reasonable requirement.
> 
> One interesting thing about this requirement is that it makes
> copy-on-read seem like the wrong primitive for image streaming.  If
> there is a base image which should not be streamed then a plain loop
> that calls bdrv_is_allocated_chain(bs, base, sector, &pnum) and copies
> sectors into bs is more straightforward than passing base to a
> copy-on-read operation somehow (through a variable that stashes the
> base away somewhere?).

You don't even have to look at the implementation to say that COR is a
useful optimisation. It basically means that you reuse data read by the
guest instead of reading it a second time in your loop. (And this is
equally true for block copy and image streaming)

If this means adding a new field in BlockDriverState, so be it.

Kevin
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to