From f87e4d6d43d7020783d18d8657b4f9c21f9e3427 Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Mon, 8 May 2023 15:08:53 +0200 Subject: [PATCH] qemu-file: Make rate_limit_used an uint64_t MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change all the functions that use it. It was already passed as uint64_t. Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrangé Reviewed-by: Cédric Le Goater Message-Id: <20230508130909.65420-6-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 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; } 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); -- 2.11.4.GIT