diff mbox series

[v2,14/16] migration: Remove unused qemu_file_credit_transfer()

Message ID 20230515195709.63843-15-quintela@redhat.com
State New
Headers show
Series Migration: More migration atomic counters | expand

Commit Message

Juan Quintela May 15, 2023, 7:57 p.m. UTC
After this change, nothing abuses QEMUFile to account for data
transferrefd during migration.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration/qemu-file.h | 8 --------
 migration/qemu-file.c | 5 -----
 2 files changed, 13 deletions(-)

Comments

Leonardo Bras May 25, 2023, 7:29 a.m. UTC | #1
On Mon, 2023-05-15 at 21:57 +0200, Juan Quintela wrote:
> After this change, nothing abuses QEMUFile to account for data
> transferrefd during migration.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  migration/qemu-file.h | 8 --------
>  migration/qemu-file.c | 5 -----
>  2 files changed, 13 deletions(-)
> 
> diff --git a/migration/qemu-file.h b/migration/qemu-file.h
> index e649718492..37f42315c7 100644
> --- a/migration/qemu-file.h
> +++ b/migration/qemu-file.h
> @@ -122,14 +122,6 @@ bool qemu_file_buffer_empty(QEMUFile *file);
>   */
>  int coroutine_mixed_fn qemu_peek_byte(QEMUFile *f, int offset);
>  void qemu_file_skip(QEMUFile *f, int size);
> -/*
> - * qemu_file_credit_transfer:
> - *
> - * Report on a number of bytes that have been transferred
> - * out of band from the main file object I/O methods. This
> - * accounting information tracks the total migration traffic.
> - */
> -void qemu_file_credit_transfer(QEMUFile *f, size_t size);
>  int qemu_file_get_error_obj(QEMUFile *f, Error **errp);
>  int qemu_file_get_error_obj_any(QEMUFile *f1, QEMUFile *f2, Error **errp);
>  void qemu_file_set_error_obj(QEMUFile *f, int ret, Error *err);
> diff --git a/migration/qemu-file.c b/migration/qemu-file.c
> index 23a21e2331..72e130631d 100644
> --- a/migration/qemu-file.c
> +++ b/migration/qemu-file.c
> @@ -411,11 +411,6 @@ static ssize_t coroutine_mixed_fn qemu_fill_buffer(QEMUFile *f)
>      return len;
>  }
>  
> -void qemu_file_credit_transfer(QEMUFile *f, size_t size)
> -{
> -    f->total_transferred += size;
> -}
> -
>  /** Closes the file
>   *
>   * Returns negative error value if any error happened on previous operations or


Reviewed-by: Leonardo Bras <leobras@redhat.com>
diff mbox series

Patch

diff --git a/migration/qemu-file.h b/migration/qemu-file.h
index e649718492..37f42315c7 100644
--- a/migration/qemu-file.h
+++ b/migration/qemu-file.h
@@ -122,14 +122,6 @@  bool qemu_file_buffer_empty(QEMUFile *file);
  */
 int coroutine_mixed_fn qemu_peek_byte(QEMUFile *f, int offset);
 void qemu_file_skip(QEMUFile *f, int size);
-/*
- * qemu_file_credit_transfer:
- *
- * Report on a number of bytes that have been transferred
- * out of band from the main file object I/O methods. This
- * accounting information tracks the total migration traffic.
- */
-void qemu_file_credit_transfer(QEMUFile *f, size_t size);
 int qemu_file_get_error_obj(QEMUFile *f, Error **errp);
 int qemu_file_get_error_obj_any(QEMUFile *f1, QEMUFile *f2, Error **errp);
 void qemu_file_set_error_obj(QEMUFile *f, int ret, Error *err);
diff --git a/migration/qemu-file.c b/migration/qemu-file.c
index 23a21e2331..72e130631d 100644
--- a/migration/qemu-file.c
+++ b/migration/qemu-file.c
@@ -411,11 +411,6 @@  static ssize_t coroutine_mixed_fn qemu_fill_buffer(QEMUFile *f)
     return len;
 }
 
-void qemu_file_credit_transfer(QEMUFile *f, size_t size)
-{
-    f->total_transferred += size;
-}
-
 /** Closes the file
  *
  * Returns negative error value if any error happened on previous operations or