qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5 2/4] qmp: Add command 'blockdev-backup'


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH v5 2/4] qmp: Add command 'blockdev-backup'
Date: Thu, 18 Dec 2014 18:22:45 +0800
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, 12/17 15:53, John Snow wrote:
> >+    aio_context = bdrv_get_aio_context(bs);
> >+    aio_context_acquire(aio_context);
> >+
> >+    target_bs = bdrv_find(target);
> >+    if (!target_bs) {
> >+        error_set(errp, QERR_DEVICE_NOT_FOUND, target);
> >+        goto out;
> >+    }
> >+
> >+    bdrv_ref(target_bs);
> >+    bdrv_set_aio_context(target_bs, bdrv_get_aio_context(bs));
> 
> why call bdrv_get_aio_context(bs) again instead of just using aio_context?
> Will this cause issues?

Could be simply aio_context.

[...]

> >diff --git a/qmp-commands.hx b/qmp-commands.hx
> >index 3348782..a7bb90b 100644
> >--- a/qmp-commands.hx
> >+++ b/qmp-commands.hx
> >@@ -1094,6 +1094,48 @@ Example:
> >                                                 "sync": "full",
> >                                                 "target": "backup.img" } }
> >  <- { "return": {} }
> >+
> >+EQMP
> >+
> >+    {
> >+        .name       = "blockdev-backup",
> >+        .args_type  = "sync:s,device:B,target:B,speed:i?,"
> >+                      "on-source-error:s?,on-target-error:s?",
> >+        .mhandler.cmd_new = qmp_marshal_input_blockdev_backup,
> >+    },
> >+
> >+SQMP
> >+blockdev-backup
> >+------------
> 
> ^ Pad out the dashes to match the line length of the command. Mentioning
> only because Eric got me on that one last time :)

OK, thanks.

Fam



reply via email to

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