qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 14/19] migration: Convert do_info_migrate() to Q


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 14/19] migration: Convert do_info_migrate() to QObject
Date: Thu, 10 Dec 2009 11:19:54 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Luiz Capitulino <address@hidden> writes:

> Return a QDict, which may contain more two QDicts, depending on

s/more two/up to two more/

> the type of migration we're performing.
>
> IMPORTANT: as a QInt stores a int64_t integer, RAM values are going
> to be stored as int64_t and not as uint64_t as they are today. If
> this is a problem QInt will have to be changed.
>
> This commit should not change user output.
>
> Signed-off-by: Luiz Capitulino <address@hidden>
> ---
>  migration.c |  117 
> +++++++++++++++++++++++++++++++++++++++++++++++++++--------
>  migration.h |    4 ++-
>  monitor.c   |    3 +-
>  3 files changed, 107 insertions(+), 17 deletions(-)
>
> diff --git a/migration.c b/migration.c
> index d6a3e26..44e37e2 100644
> --- a/migration.c
> +++ b/migration.c
[...]
> +/**
> + * do_info_migrate(): Migration status
> + *
> + * Return a QDict. If migration is active there will be another
> + * QDict with RAM migration status and if block migration is active
> + * another one with block migration status.
> + *
> + * The main QDict contains the following:
> + *
> + * - "status": migration status
> + * - "ram": only present if "status" is "active", it is a QDict with the
> + *   following RAM information (in bytes):
> + *          - "transferred": amount transferred
> + *          - "remaining": amount remaining
> + *          - "total": total
> + * - "disk": only present if it is a block migration, it is a QDict with

... if "status" is "active" and it is a block migration ...

> + *   the following disk information (in bytes):
> + *          - "transferred": amount transferred
> + *          - "remaining": amount remaining
> + *          - "total": total
> + *
> + * Examples:
> + *
> + * 1. Migration is "completed":
> + *
> + * { "status": "completed" }
> + *
> + * 2. Migration is "active" and it is not a block migration:
> + *
> + * { "status": "active",
> + *            "ram": { "transferred": 123, "remaining": 123, "total": 246 } }
> + *
> + * 3. Migration is "active" and it is a block migration:
> + *
> + * { "status": "active",
> + *   "ram": { "total": 1057024, "remaining": 1053304, "transferred": 3720 },
> + *   "disk": { "total": 20971520, "remaining": 20880384, "transferred": 
> 91136 }}
> + */
> +void do_info_migrate(Monitor *mon, QObject **ret_data)
[...]




reply via email to

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