]> git.proxmox.com Git - mirror_qemu.git/commitdiff
migration: migration_rate_limit_reset() don't need the QEMUFile
authorJuan Quintela <quintela@redhat.com>
Wed, 25 Oct 2023 09:11:13 +0000 (11:11 +0200)
committerJuan Quintela <quintela@redhat.com>
Tue, 31 Oct 2023 07:44:33 +0000 (08:44 +0100)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231025091117.6342-9-quintela@redhat.com>

migration/migration-stats.c
migration/migration-stats.h
migration/migration.c

index 4ae8c0c722a0bda4736a55f8cf0101965d91da5b..f690b98a03e76c1742a68f6fe02b881f4daae8b5 100644 (file)
@@ -54,7 +54,7 @@ void migration_rate_set(uint64_t limit)
     stat64_set(&mig_stats.rate_limit_max, limit / XFER_LIMIT_RATIO);
 }
 
-void migration_rate_reset(QEMUFile *f)
+void migration_rate_reset(void)
 {
     stat64_set(&mig_stats.rate_limit_start, migration_transferred_bytes());
 }
index e3863bf9bb52ec70fc6d2c2f8b220aae508b927d..68f3939188a0aaf02e49c9b308483d2010fae57e 100644 (file)
@@ -120,10 +120,8 @@ uint64_t migration_rate_get(void);
  * migration_rate_reset: Reset the rate limit counter.
  *
  * This is called when we know we start a new transfer cycle.
- *
- * @f: QEMUFile used for main migration channel
  */
-void migration_rate_reset(QEMUFile *f);
+void migration_rate_reset(void);
 
 /**
  * migration_rate_set: Set the maximum amount that can be transferred.
index 04d45461500b634665b42af463a72f1795020cfa..a25a2f3c547d54b9db645eb46b1dd25e8505b96d 100644 (file)
@@ -2785,7 +2785,7 @@ static void migration_update_counters(MigrationState *s,
             stat64_get(&mig_stats.dirty_bytes_last_sync) / expected_bw_per_ms;
     }
 
-    migration_rate_reset(s->to_dst_file);
+    migration_rate_reset();
 
     update_iteration_initial_status(s);