aboutsummaryrefslogtreecommitdiff
path: root/migration/migration-stats.h
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2023-05-15 21:56:59 +0200
committerJuan Quintela <quintela@redhat.com>2023-05-18 18:40:51 +0200
commit99319e2dafaf2ad05412c8f119efcdf24a3baf04 (patch)
treea725260b649ad4747c734487051dc99d5cc7abec /migration/migration-stats.h
parente1fde0e038bafd0bd05db7d43305b9b2f03c0683 (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.h')
-rw-r--r--migration/migration-stats.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/migration/migration-stats.h b/migration/migration-stats.h
index 7b64dc7cc2..827ea80c9b 100644
--- a/migration/migration-stats.h
+++ b/migration/migration-stats.h
@@ -133,4 +133,15 @@ void migration_rate_reset(void);
* @new_rate: new maximum amount
*/
void migration_rate_set(uint64_t new_rate);
+
+/**
+ * migration_transferred_bytes: Return number of bytes transferred
+ *
+ * @f: QEMUFile used for main migration channel
+ *
+ * Returns how many bytes have we transferred since the beginning of
+ * the migration. It accounts for bytes sent through any migration
+ * channel, multifd, qemu_file, rdma, ....
+ */
+uint64_t migration_transferred_bytes(QEMUFile *f);
#endif