qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [RFC] Making 'block-stream', and 'block-commit' accept


From: Kashyap Chamarthy
Subject: Re: [Qemu-block] [RFC] Making 'block-stream', and 'block-commit' accept node-name
Date: Thu, 1 Jun 2017 16:03:52 +0200
User-agent: Mutt/1.6.0.1 (2016-04-01)

On Wed, May 31, 2017 at 04:57:20PM +0200, Kashyap Chamarthy wrote:
> On Tue, May 30, 2017 at 04:53:23PM +0200, Alberto Garcia wrote:
> > On Mon 29 May 2017 09:03:22 PM CEST, Kashyap Chamarthy wrote:

[...]

> > > While we have `blockdev-{mirror, backup}` as 'node-name'-alternatives
> > > for `drive-{mirror, backup}`, as the eagle-eyed will, the
> > > `block-stream` and `block-commit` commands still operate on file names
> > > for parameters 'base' and 'top'.
> > 
> > block-stream does accept a node name for the top and base images (see
> > 554b614765090f47d and 312fe09cc8af86c).

Indeed it does.  The key here is the 'base-node' parameter.  Thanks!

Test
----

To turn this:

    [A] <-- [B] <-- [C] <-- [D]

Into:

    [A] <-- [C] <-- [D]

#----------------------------------------------------------------------
Check the backing file depth of image [D]:

    $ qemu-img info --backing-chain d.qcow2  | grep "backing file:"
    backing file: c.qcow2
    backing file: b.qcow2
    backing file: ./a.qcow2
#----------------------------------------------------------------------

Perform intermediate streaming:

(QEMU) block-stream device=node-C base-node=node-A job-id=job0                  
                                                                                
                   
{
    "execute": "block-stream", 
    "arguments": {
        "device": "node-D", 
        "job-id": "job0", 
        "base-node": "node-A"
    }
}
{
    "return": {}
}
(QEMU) 
{u'timestamp': {u'seconds': 1496325065, u'microseconds': 808768}, u'data': 
{u'device': u'job0', u'type': u'stream', u'speed': 0, u'len': 41126400, 
u'offset': 41126400}, u'event': u'BLOCK_JOB_COMPLETED'}
#----------------------------------------------------------------------

Check the backing file depth, it is now: A <- C <- D:

$ qemu-img info --backing-chain d.qcow2  | grep "backing file:"
backing file: c.qcow2
backing file: ./a.qcow2
#----------------------------------------------------------------------

[...]

-- 
/kashyap



reply via email to

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