[libvirt] [PATCH v4 05/12] qemu: Add support for DUMP_COMPLETED event
Jiri Denemark
jdenemar at redhat.com
Fri Feb 2 13:50:39 UTC 2018
On Thu, Feb 01, 2018 at 18:24:36 -0500, John Ferlan wrote:
> The event will be fired when the domain memory only dump completes.
>
> Fill in a return buffer to store/pass along the dump statistics that
> will be eventually shared by a query-dump command. Also pass along
> the status of the filling and any possible error received.
>
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
> src/qemu/qemu_monitor.c | 21 ++++++++++++++++
> src/qemu/qemu_monitor.h | 14 ++++++++++-
> src/qemu/qemu_monitor_json.c | 60 ++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 94 insertions(+), 1 deletion(-)
>
> diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
> index fc146bdbf..f4edfc36b 100644
> --- a/src/qemu/qemu_monitor.c
> +++ b/src/qemu/qemu_monitor.c
> @@ -210,6 +210,10 @@ VIR_ENUM_IMPL(qemuMonitorBlockIOStatus,
> QEMU_MONITOR_BLOCK_IO_STATUS_LAST,
> "ok", "failed", "nospace")
>
> +VIR_ENUM_IMPL(qemuMonitorDumpStatus,
> + QEMU_MONITOR_DUMP_STATUS_LAST,
> + "none", "active", "completed", "failed")
> +
> char *
> qemuMonitorEscapeArg(const char *in)
> {
> @@ -1667,6 +1671,23 @@ qemuMonitorEmitBlockThreshold(qemuMonitorPtr mon,
>
>
> int
> +qemuMonitorEmitDumpCompleted(qemuMonitorPtr mon,
> + int status,
> + qemuMonitorDumpStatsPtr stats,
> + const char *error)
> +{
> + int ret = -1;
> +
> + VIR_DEBUG("mon=%p", mon);
> +
> + QEMU_MONITOR_CALLBACK(mon, ret, domainDumpCompleted, mon->vm,
> + status, stats, error);
> +
> + return ret;
> +}
> +
> +
> +int
> qemuMonitorSetCapabilities(qemuMonitorPtr mon)
> {
> QEMU_CHECK_MONITOR(mon);
> diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
> index c58839ca7..63b121cb1 100644
> --- a/src/qemu/qemu_monitor.h
> +++ b/src/qemu/qemu_monitor.h
> @@ -246,7 +246,6 @@ typedef int (*qemuMonitorDomainBlockThresholdCallback)(qemuMonitorPtr mon,
> unsigned long long excess,
> void *opaque);
>
> -
> typedef enum {
> QEMU_MONITOR_DUMP_STATUS_NONE,
> QEMU_MONITOR_DUMP_STATUS_ACTIVE,
Looks like an artifact from moving the hunk into a different patch.
...
Reviewed-by: Jiri Denemark <jdenemar at redhat.com>
More information about the libvir-list
mailing list