diff options
author | Juan Quintela <quintela@redhat.com> | 2023-05-15 21:56:59 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2023-05-18 18:40:51 +0200 |
commit | 99319e2dafaf2ad05412c8f119efcdf24a3baf04 (patch) | |
tree | a725260b649ad4747c734487051dc99d5cc7abec /migration/migration-stats.c | |
parent | e1fde0e038bafd0bd05db7d43305b9b2f03c0683 (diff) |
migration: Move migration_total_bytes() to migration-stats.c
Once there rename it to migration_transferred_bytes() and pass a
QEMUFile instead of a migration object.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20230515195709.63843-7-quintela@redhat.com>
Diffstat (limited to 'migration/migration-stats.c')
-rw-r--r-- | migration/migration-stats.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/migration/migration-stats.c b/migration/migration-stats.c index 0890220ba5..39e98d6fa9 100644 --- a/migration/migration-stats.c +++ b/migration/migration-stats.c @@ -59,3 +59,8 @@ void migration_rate_account(uint64_t len) { stat64_add(&mig_stats.rate_limit_used, len); } + +uint64_t migration_transferred_bytes(QEMUFile *f) +{ + return qemu_file_transferred(f) + stat64_get(&mig_stats.multifd_bytes); +} |