Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
qemu-file: Make rate_limit_used an uint64_t
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>
  • Loading branch information
Juan Quintela committed May 15, 2023
1 parent bffc044 commit f87e4d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions migration/qemu-file.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion migration/qemu-file.h
Expand Up @@ -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);
Expand Down

0 comments on commit f87e4d6

Please sign in to comment.