On 09/14/2016 12:40 PM, Ashijeet Acharya wrote: > Mark the old commands 'migrate_set_speed' and 'migrate_set_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 set > its upper bound limit to 2000 seconds. > Update the query part in both hmp and qmp qemu control interfaces. > > Signed-off-by: Ashijeet Acharya <ashijeetacha...@gmail.com> > ---
> +++ b/migration/migration.c > @@ -804,6 +802,20 @@ void qmp_migrate_set_parameters(MigrationParameters > *params, Error **errp) > "cpu_throttle_increment", > "an integer in the range of 1 to 99"); > } > + if (params->has_max_bandwidth && > + (params->max_bandwidth < 0 || params->max_bandwidth > SIZE_MAX)) { > + error_setg(errp, QERR_INVALID_PARAMETER_VALUE "%zu", > + "max_bandwidth", > + "an integer in the range of 0 to ", SIZE_MAX); That looks weird (not necessarily your fault; but it explains why we've been trying to avoid new QERR_ macros). No other use of QERR_INVALID_PARAMETER_VALUE adds additional text. So I'm thinking it's better to just follow suit with a shorter non-parameterized message; such as in this instance: balloon.c: error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "target", "a size"); Or, just open-code the full error message, instead of having half the message hidden behind the QERR_INVALID_PARAMETER_VALUE macro. Otherwise, it looks good to me. With the error message sorted out, you can add: Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature