aboutsummaryrefslogtreecommitdiff
path: root/migration/migration-stats.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2023-10-25 11:11:12 +0200
committerJuan Quintela <quintela@redhat.com>2023-10-31 08:44:33 +0100
commitf57e5a6ce50f10941399014c628db8713c2bc3f9 (patch)
tree84bdff4558090aedb956ce8757614594995748da /migration/migration-stats.c
parente9c0eed7c2c20f65904ffb33fc7b47a229ed5106 (diff)
migration: migration_transferred_bytes() don't need the QEMUFile
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20231025091117.6342-8-quintela@redhat.com>
Diffstat (limited to 'migration/migration-stats.c')
-rw-r--r--migration/migration-stats.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/migration/migration-stats.c b/migration/migration-stats.c
index 1d9197b4c3..4ae8c0c722 100644
--- a/migration/migration-stats.c
+++ b/migration/migration-stats.c
@@ -30,7 +30,7 @@ bool migration_rate_exceeded(QEMUFile *f)
}
uint64_t rate_limit_start = stat64_get(&mig_stats.rate_limit_start);
- uint64_t rate_limit_current = migration_transferred_bytes(f);
+ uint64_t rate_limit_current = migration_transferred_bytes();
uint64_t rate_limit_used = rate_limit_current - rate_limit_start;
if (rate_limit_max > 0 && rate_limit_used > rate_limit_max) {
@@ -56,10 +56,10 @@ void migration_rate_set(uint64_t limit)
void migration_rate_reset(QEMUFile *f)
{
- stat64_set(&mig_stats.rate_limit_start, migration_transferred_bytes(f));
+ stat64_set(&mig_stats.rate_limit_start, migration_transferred_bytes());
}
-uint64_t migration_transferred_bytes(QEMUFile *f)
+uint64_t migration_transferred_bytes(void)
{
uint64_t multifd = stat64_get(&mig_stats.multifd_bytes);
uint64_t rdma = stat64_get(&mig_stats.rdma_bytes);