aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2023-05-08 15:08:49 +0200
committerJuan Quintela <quintela@redhat.com>2023-05-15 13:42:07 +0200
commit52d01d4a5d6963e24ff59af0c39b47fd5d229fb7 (patch)
treef4f7a6152b2d2b99c659cb0dfac91ec96f6d64a9
parentdc2836c3806f004f36d423cedba86103c87a21a3 (diff)
downloadqemu-52d01d4a5d6963e24ff59af0c39b47fd5d229fb7.zip
qemu-52d01d4a5d6963e24ff59af0c39b47fd5d229fb7.tar.gz
qemu-52d01d4a5d6963e24ff59af0c39b47fd5d229fb7.tar.bz2
migration: A rate limit value of 0 is valid
And it is the best way to not have rate_limit. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20230508130909.65420-2-quintela@redhat.com>
-rw-r--r--migration/migration.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/migration/migration.c b/migration/migration.c
index 439e865..5636119 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -2140,12 +2140,7 @@ static int postcopy_start(MigrationState *ms)
* will notice we're in POSTCOPY_ACTIVE and not actually
* wrap their state up here
*/
- /* 0 max-postcopy-bandwidth means unlimited */
- if (!bandwidth) {
- qemu_file_set_rate_limit(ms->to_dst_file, INT64_MAX);
- } else {
- qemu_file_set_rate_limit(ms->to_dst_file, bandwidth / XFER_LIMIT_RATIO);
- }
+ qemu_file_set_rate_limit(ms->to_dst_file, bandwidth / XFER_LIMIT_RATIO);
if (migrate_postcopy_ram()) {
/* Ping just for debugging, helps line traces up */
qemu_savevm_send_ping(ms->to_dst_file, 2);