aboutsummaryrefslogtreecommitdiff
path: root/migration/qemu-file.h
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2022-06-20 12:01:52 +0100
committerDr. David Alan Gilbert <dgilbert@redhat.com>2022-06-22 19:33:43 +0100
commitbc698c367d6fac15454ee3ff6bb168e43c151465 (patch)
tree80bac9b16096d77c6f00284be2328ac779798795 /migration/qemu-file.h
parent1a93bd2f60acbf7eb3583805f9d6605d909d403f (diff)
downloadqemu-bc698c367d6fac15454ee3ff6bb168e43c151465.zip
qemu-bc698c367d6fac15454ee3ff6bb168e43c151465.tar.gz
qemu-bc698c367d6fac15454ee3ff6bb168e43c151465.tar.bz2
migration: rename qemu_file_update_transfer to qemu_file_acct_rate_limit
The qemu_file_update_transfer name doesn't give a clear guide on what its purpose is, and how it differs from the qemu_file_credit_transfer method. The latter is specifically for accumulating for total migration traffic, while the former is specifically for accounting in thue rate limit calculations. The new name give better guidance on its usage. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@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>
Diffstat (limited to 'migration/qemu-file.h')
-rw-r--r--migration/qemu-file.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/migration/qemu-file.h b/migration/qemu-file.h
index d96f5f7..901f2cf 100644
--- a/migration/qemu-file.h
+++ b/migration/qemu-file.h
@@ -188,7 +188,14 @@ void qemu_file_skip(QEMUFile *f, int size);
*/
void qemu_file_credit_transfer(QEMUFile *f, size_t size);
void qemu_file_reset_rate_limit(QEMUFile *f);
-void qemu_file_update_transfer(QEMUFile *f, int64_t len);
+/*
+ * qemu_file_acct_rate_limit:
+ *
+ * Report on a number of bytes the have been transferred
+ * out of band from the main file object I/O methods, and
+ * need to be applied to the rate limiting calcuations
+ */
+void qemu_file_acct_rate_limit(QEMUFile *f, int64_t len);
void qemu_file_set_rate_limit(QEMUFile *f, int64_t new_rate);
int64_t qemu_file_get_rate_limit(QEMUFile *f);
int qemu_file_get_error_obj(QEMUFile *f, Error **errp);