[libvirt] [PATCH RFC 39/51] qemu: monitor: Add new fields for 'block-commit' command

Ján Tomko jtomko at redhat.com
Mon Jan 7 16:03:01 UTC 2019


On Wed, Dec 12, 2018 at 06:08:55PM +0100, Peter Krempa wrote:
>Allow using the node name to specify the base and top of the 'commit'
>operation, allow specifying explicit job name and add support for
>delayed dismiss of the job so that we can reap the state even if
>libvirtd was not running when qemu emitted the job completion event.
>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/qemu/qemu_driver.c       |  4 ++--
> src/qemu/qemu_monitor.c      | 21 +++++++++++++++------
> src/qemu/qemu_monitor.h      |  6 +++++-
> src/qemu/qemu_monitor_json.c | 22 ++++++++++++++++++++--
> src/qemu/qemu_monitor_json.h |  4 ++++
> tests/qemumonitorjsontest.c  |  2 +-
> 6 files changed, 47 insertions(+), 12 deletions(-)
>
>diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
>index d6cad63863..fe8d8d1bf7 100644
>--- a/src/qemu/qemu_monitor.c
>+++ b/src/qemu/qemu_monitor.c
>@@ -3280,18 +3280,27 @@ qemuMonitorTransaction(qemuMonitorPtr mon, virJSONValuePtr *actions)
>
> /* Start a block-commit block job.  bandwidth is in bytes/sec.  */
> int
>-qemuMonitorBlockCommit(qemuMonitorPtr mon, const char *device,
>-                       const char *top, const char *base,
>+qemuMonitorBlockCommit(qemuMonitorPtr mon,
>+                       const char *device,
>+                       const char *jobname,
>+                       bool persistjob,
>+                       const char *top,
>+                       const char *topNode,
>+                       const char *base,
>+                       const char *baseNode,
>                        const char *backingName,
>                        unsigned long long bandwidth)
> {
>-    VIR_DEBUG("device=%s, top=%s, base=%s, backingName=%s, bandwidth=%llu",
>-              device, top, base, NULLSTR(backingName), bandwidth);
>+    VIR_DEBUG("device=%s, jobname=%s, persistjob=%d, top=%s, topNode=%s, "
>+              "base=%s, baseNode=%s, backingName=%s, bandwidth=%llu",
>+              device, NULLSTR(jobname), persistjob, NULLSTR(top), NULLSTR(topNode),
>+              NULLSTR(base), NULLSTR(baseNode), NULLSTR(backingName), bandwidth);
>

No checks for mixing *Node and non-*Node variables?

>     QEMU_CHECK_MONITOR(mon);
>
>-    return qemuMonitorJSONBlockCommit(mon, device, top, base,
>-                                         backingName, bandwidth);
>+    return qemuMonitorJSONBlockCommit(mon, device, jobname, persistjob, top,
>+                                      topNode, base, baseNode, backingName,
>+                                      bandwidth);
> }
>
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190107/814701a5/attachment-0001.sig>


More information about the libvir-list mailing list