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 02/12] Backup: clear all bitmap


From: Kashyap Chamarthy
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH v24 02/12] Backup: clear all bitmap when doing block checkpoint
Date: Tue, 16 Aug 2016 14:55:41 +0200
User-agent: Mutt/1.6.0.1 (2016-04-01)

On Wed, Jul 27, 2016 at 03:01:43PM +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>
> Signed-off-by: zhanghailiang <address@hidden>
> Signed-off-by: Gonglei <address@hidden>
> ---
>  block/backup.c               | 18 ++++++++++++++++++
>  include/block/block_backup.h | 25 +++++++++++++++++++++++++
>  2 files changed, 43 insertions(+)
>  create mode 100644 include/block/block_backup.h

[...]
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]