qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-2.10 09/10] migration: Unshare MigrationPara


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH for-2.10 09/10] migration: Unshare MigrationParameters struct for now
Date: Tue, 18 Jul 2017 17:01:18 +0100
User-agent: Mutt/1.8.3 (2017-05-23)

On Tue, Jul 18, 2017 at 03:41:25PM +0200, Markus Armbruster wrote:
> Commit de63ab6 "migrate: Share common MigrationParameters struct"
> reused MigrationParameters for the arguments of
> migrate-set-parameters, with the following rationale:
> 
>     It is rather verbose, and slightly error-prone, to repeat
>     the same set of parameters for input (migrate-set-parameters)
>     as for output (query-migrate-parameters), where the only
>     difference is whether the members are optional.  We can just
>     document that the optional members will always be present
>     on output, and then share a common struct between both
>     commands.  The next patch can then reduce the amount of
>     code needed on input.
> 
> I need to unshare them to correct a design flaw in a stupid, but
> minimally invasive way, in the next commit.  We can restore the
> sharing when we redo that patch in a less stupid way.  Add a suitable
> TODO comment.
> 
> Note that I revert only the sharing part of commit de63ab6, not the
> part that made the members of query-migrate-parameters' result
> optional.  The schema (and thus introspection) remains inaccurate for
> query-migrate-parameters.  If we decide not to restore the sharing, we
> should revert that part, too.
> 
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  hmp.c                 |  4 +--
>  migration/migration.c | 12 +++++---
>  qapi-schema.json      | 85 
> ++++++++++++++++++++++++++++++++++++++++++++++-----
>  3 files changed, 87 insertions(+), 14 deletions(-)

Reviewed-by: Daniel P. Berrange <address@hidden>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



reply via email to

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