|
From: | Juan Quintela |
Subject: | Re: [Qemu-block] [RFC PATCH 18/56] migration: Make parameter max-bandwidth unsigned in QAPI/QMP |
Date: | Mon, 07 Aug 2017 18:50:36 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Markus Armbruster <address@hidden> wrote: > Byte rates should use QAPI type 'size' (uint64_t). > migrate_set_speed's parameter @value and member @max-bandwidth of > MigrationParameters and MigrateSetParameters are 'int' (int64_t). > > Change them all to 'size'. > > migrate_set_speed and migrate-set-parameters now accept bandwidth > values between 2^63 and SIZE_MAX (commonly 2^64-1). They accept > negative values as before, because that's how the QObject input > visitor works for backward compatibility. > > So does HMP's migrate_set_speed, except it continues to reject > negative values. > > query-migrate-parameters now reports bandwidth values above 2^63-1 > correctly instead of their (negative) two's complement. > > So does HMP's "info migrate_params". > > Signed-off-by: Markus Armbruster <address@hidden> Reviewed-by: Juan Quintela <address@hidden> > - if (params->has_max_bandwidth && > - (params->max_bandwidth < 0 || params->max_bandwidth > SIZE_MAX)) { > + if (params->has_max_bandwidth && params->max_bandwidth > SIZE_MAX) { Much nicer for something that we know can't be negative O:-)
[Prev in Thread] | Current Thread | [Next in Thread] |