[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 10/11] qemu-file: Make rate_limit_used an uint64_t
From: |
Juan Quintela |
Subject: |
[PULL 10/11] qemu-file: Make rate_limit_used an uint64_t |
Date: |
Mon, 15 May 2023 14:33:33 +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>
Reviewed-by: CĂ©dric Le Goater <clg@kaod.org>
Message-Id: <20230508130909.65420-6-quintela@redhat.com>
---
migration/qemu-file.h | 2 +-
migration/qemu-file.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/migration/qemu-file.h b/migration/qemu-file.h
index 13c7c78c0d..6905825f23 100644
--- a/migration/qemu-file.h
+++ b/migration/qemu-file.h
@@ -138,7 +138,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);
diff --git a/migration/qemu-file.c b/migration/qemu-file.c
index 94d1069c8e..1b39d51dd4 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;
@@ -756,7 +756,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;
}
--
2.40.1
- [PULL 01/11] migration/calc-dirty-rate: replaced CRC32 with xxHash, (continued)
- [PULL 01/11] migration/calc-dirty-rate: replaced CRC32 with xxHash, Juan Quintela, 2023/05/15
- [PULL 02/11] softmmu: Create qemu_target_pages_to_MiB(), Juan Quintela, 2023/05/15
- [PULL 07/11] migration: A rate limit value of 0 is valid, Juan Quintela, 2023/05/15
- [PULL 11/11] qemu-file: Remove total from qemu_file_total_transferred_*(), Juan Quintela, 2023/05/15
- [PULL 09/11] qemu-file: make qemu_file_[sg]et_rate_limit() use an uint64_t, Juan Quintela, 2023/05/15
- [PULL 05/11] migration: Teach dirtyrate about qemu_target_page_bits(), Juan Quintela, 2023/05/15
- [PULL 06/11] migration: Make dirtyrate.c target independent, Juan Quintela, 2023/05/15
- [PULL 03/11] Use new created qemu_target_pages_to_MiB(), Juan Quintela, 2023/05/15
- [PULL 04/11] migration: Teach dirtyrate about qemu_target_page_size(), Juan Quintela, 2023/05/15
- [PULL 08/11] migration: We set the rate_limit by a second, Juan Quintela, 2023/05/15
- [PULL 10/11] qemu-file: Make rate_limit_used an uint64_t,
Juan Quintela <=
- Re: [PULL 00/11] Migration 20230515 patches, Richard Henderson, 2023/05/15