[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4] Move max-bandwidth and downtime-limit into m
From: |
Ashijeet Acharya |
Subject: |
Re: [Qemu-devel] [PATCH v4] Move max-bandwidth and downtime-limit into migrate_set_parameter for both hmp and qmp |
Date: |
Fri, 9 Sep 2016 19:32:08 +0530 |
On Fri, Sep 9, 2016 at 8:41 AM, Eric Blake <address@hidden> wrote:
> On 09/08/2016 10:59 AM, Ashijeet Acharya wrote:
>> Mark old-commands for speed and downtime as deprecated.
>> Move max-bandwidth and downtime-limit into migrate-set-parameters for
>> setting maximum migration speed and expected downtime limit parameters
>> respectively.
>> Change downtime units to milliseconds (only for new-command) and update
>> the query part in both hmp and qmp qemu control interfaces.
>>
>> Signed-off-by: Ashijeet Acharya <address@hidden>
>> ---
>
>> +void qmp_migrate_set_speed(int64_t valuebw, Error **errp)
>> +{
>> + bool has_compress_level = false;
>> + bool has_compress_threads = false;
>> + bool has_decompress_threads = false;
>> + bool has_cpu_throttle_initial = false;
>> + bool has_cpu_throttle_increment = false;
>> + bool has_tls_creds = false;
>> + bool has_tls_hostname = false;
>> + bool has_max_bandwidth = true;
>> + bool has_downtime_limit = false;
>> + const char *valuestr = NULL;
>> + long valueint = 0;
>> + Error *err = NULL;
>> +
>> + qmp_migrate_set_parameters(has_compress_level, valueint,
>> + has_compress_threads, valueint,
>> + has_decompress_threads, valueint,
>> + has_cpu_throttle_initial, valueint,
>> + has_cpu_throttle_increment, valueint,
>> + has_tls_creds, valuestr,
>> + has_tls_hostname, valuestr,
>> + has_max_bandwidth, valuebw,
>> + has_downtime_limit, valueint,
>> + &err);
>> +
>> +}
>
> Oh, and I was so caught up on the grossness of this method that I failed
> to overlook that you are silently ignoring and leaking any errors.
> Since you aren't making any further decisions, you don't need the 'Error
> *err' declaration, and can just pass 'errp' instead of '&err' to
> qmp_migrate_set_parameters(). At any rate, I'm also posting my proposal
> to make this patch have a simpler back-compat method, by using qapi
> boxed parameters of my series.
>
Should I send v5 in reply to your series since it uses your new qapi
boxed parameters method or as an independent new thread?
Ashijeet
> --
> Eric Blake eblake redhat com +1-919-301-3266
> Libvirt virtualization library http://libvirt.org