qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [PATCH v24 01/12] unblock backup operation


From: Kashyap Chamarthy
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH v24 01/12] unblock backup operations in backing file
Date: Tue, 16 Aug 2016 15:13:49 +0200
User-agent: Mutt/1.6.0.1 (2016-04-01)

[I erroneously gave a Tested-by to the next patch (02/12) in this
series, instead of this one.]

On Wed, Jul 27, 2016 at 03:01:42PM +0800, Changlong Xie wrote:
> From: Wen Congyang <address@hidden>
> 
> Signed-off-by: Wen Congyang <address@hidden>
> Signed-off-by: Changlong Xie <address@hidden>
> Signed-off-by: Wang WeiWei <address@hidden>
> ---
>  block.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)

Tested-by: Kashyap Chamarthy <address@hidden>

Test case:

Without this patch applied
==========================

Create an empty target image:

        $ qemu-img create -f qcow2 target.qcow2 1G

$ ./qmp-shell -v -p ./qmp-sock

(QEMU) blockdev-add 
options={"id":"drive-ide1-0-0","driver":"qcow2","file":{"driver":"file","filename":"/export/target.qcow2"},"backing":"drive-ide0-0-0"}

(QEMU) blockdev-backup device=drive-ide0-0-0 target=drive-ide1-0-0 sync=none
{
    "execute": "blockdev-backup",
    "arguments": {
        "device": "drive-ide0-0-0",
        "target": "drive-ide1-0-0",
        "sync": "none"
    }                                                                           
                                                                                
                              
}                                                                               
{
    "error": {
        "class": "GenericError",
        "desc": "Node 'drive-ide0-0-0' is busy: node is used as backing hd of 
'#block360'"
    }                                                                           
                                                                                
                              
}                                                                               

With this patch applied
=======================

`blockdev-backup` of an image to its immediate overlay succeds:

-----------------------------------------------------------------------
(QEMU) blockdev-backup device=drive-ide0-0-0 target=drive-ide1-0-0 sync=none
{
    "execute": "blockdev-backup", 
    "arguments": {
        "device": "drive-ide0-0-0", 
        "target": "drive-ide1-0-0", 
        "sync": "none"
    }
}
{
    "return": {}
}
(QEMU) query-block-jobs
{
    "execute": "query-block-jobs", 
    "arguments": {}
}
{
    "return": [
        {
            "busy": false, 
            "type": "backup", 
            "len": 41126400, 
            "paused": false, 
            "ready": false, 
            "io-status": "ok", 
            "offset": 0, 
            "device": "drive-ide0-0-0", 
            "speed": 0
        }
    ]
}
-----------------------------------------------------------------------

-- 
/kashyap



reply via email to

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