diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2022-06-20 12:01:50 +0100 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2022-06-22 19:33:36 +0100 |
commit | fbfa6404e597920ad72510461e0b0fed5243ce1d (patch) | |
tree | fbeb0b70234041557ea0027f59c59f23c3222076 /migration/migration.c | |
parent | 154d87b4ef7f32fe4b11357648ec0b81b7e77d59 (diff) | |
download | qemu-fbfa6404e597920ad72510461e0b0fed5243ce1d.zip qemu-fbfa6404e597920ad72510461e0b0fed5243ce1d.tar.gz qemu-fbfa6404e597920ad72510461e0b0fed5243ce1d.tar.bz2 |
migration: rename qemu_ftell to qemu_file_total_transferred
The name 'ftell' gives the misleading impression that the QEMUFile
objects are seekable. This is not the case, as in general we just
have an opaque stream. The users of this method are only interested
in the total bytes processed. This switches to a new name that
reflects the intended usage.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
dgilbert: Wrapped long line
Diffstat (limited to 'migration/migration.c')
-rw-r--r-- | migration/migration.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/migration/migration.c b/migration/migration.c index 5863af1..6d56eb1 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -3539,7 +3539,8 @@ static MigThrError migration_detect_error(MigrationState *s) /* How many bytes have we transferred since the beginning of the migration */ static uint64_t migration_total_bytes(MigrationState *s) { - return qemu_ftell(s->to_dst_file) + ram_counters.multifd_bytes; + return qemu_file_total_transferred(s->to_dst_file) + + ram_counters.multifd_bytes; } static void migration_calculate_complete(MigrationState *s) |