[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 05/21] qemu-file: Make rate_limit_used an uint64_t
From: |
Juan Quintela |
Subject: |
[PATCH 05/21] qemu-file: Make rate_limit_used an uint64_t |
Date: |
Mon, 8 May 2023 15:08:53 +0200 |
Change all the functions that use it. It was already passed as
uint64_t.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230504113841.23130-5-quintela@redhat.com>
---
migration/qemu-file.c | 4 ++--
migration/qemu-file.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/migration/qemu-file.c b/migration/qemu-file.c
index 346b683929..f3cb0cd94f 100644
--- a/migration/qemu-file.c
+++ b/migration/qemu-file.c
@@ -49,7 +49,7 @@ struct QEMUFile {
* Total amount of data in bytes queued for transfer
* during this rate limiting time window
*/
- int64_t rate_limit_used;
+ uint64_t rate_limit_used;
/* The sum of bytes transferred on the wire */
uint64_t total_transferred;
@@ -759,7 +759,7 @@ void qemu_file_reset_rate_limit(QEMUFile *f)
f->rate_limit_used = 0;
}
-void qemu_file_acct_rate_limit(QEMUFile *f, int64_t len)
+void qemu_file_acct_rate_limit(QEMUFile *f, uint64_t len)
{
f->rate_limit_used += len;
}
diff --git a/migration/qemu-file.h b/migration/qemu-file.h
index 04ca48cbef..d758e7f10b 100644
--- a/migration/qemu-file.h
+++ b/migration/qemu-file.h
@@ -137,7 +137,7 @@ void qemu_file_reset_rate_limit(QEMUFile *f);
* 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_acct_rate_limit(QEMUFile *f, uint64_t len);
void qemu_file_set_rate_limit(QEMUFile *f, uint64_t new_rate);
uint64_t qemu_file_get_rate_limit(QEMUFile *f);
int qemu_file_get_error_obj(QEMUFile *f, Error **errp);
--
2.40.0
- Re: [PATCH 02/21] migration: Don't use INT64_MAX for unlimited rate, (continued)
[PATCH 03/21] migration: We set the rate_limit by a second, Juan Quintela, 2023/05/08
[PATCH 04/21] qemu-file: make qemu_file_[sg]et_rate_limit() use an uint64_t, Juan Quintela, 2023/05/08
[PATCH 05/21] qemu-file: Make rate_limit_used an uint64_t,
Juan Quintela <=
[PATCH 06/21] qemu-file: Remove total from qemu_file_total_transferred_*(), Juan Quintela, 2023/05/08
[PATCH 10/21] migration: Move rate_limit_max and rate_limit_used to migration_stats, Juan Quintela, 2023/05/08
Re: [PATCH 10/21] migration: Move rate_limit_max and rate_limit_used to migration_stats, Cédric Le Goater, 2023/05/15