[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 18/21] qemu-file: Remove QEMUFileHooks
From: |
Juan Quintela |
Subject: |
[PULL 18/21] qemu-file: Remove QEMUFileHooks |
Date: |
Tue, 30 May 2023 13:54:26 +0200 |
The only user was rdma, and its use is gone.
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230509120700.78359-8-quintela@redhat.com>
---
migration/qemu-file.h | 4 ----
migration/qemu-file.c | 6 ------
migration/rdma.c | 9 ---------
3 files changed, 19 deletions(-)
diff --git a/migration/qemu-file.h b/migration/qemu-file.h
index c43c410168..c7c832d200 100644
--- a/migration/qemu-file.h
+++ b/migration/qemu-file.h
@@ -36,12 +36,8 @@
#define RAM_CONTROL_ROUND 1
#define RAM_CONTROL_FINISH 3
-typedef struct QEMUFileHooks {
-} QEMUFileHooks;
-
QEMUFile *qemu_file_new_input(QIOChannel *ioc);
QEMUFile *qemu_file_new_output(QIOChannel *ioc);
-void qemu_file_set_hooks(QEMUFile *f, const QEMUFileHooks *hooks);
int qemu_fclose(QEMUFile *f);
/*
diff --git a/migration/qemu-file.c b/migration/qemu-file.c
index a222daeaab..c94b667726 100644
--- a/migration/qemu-file.c
+++ b/migration/qemu-file.c
@@ -38,7 +38,6 @@
#define MAX_IOV_SIZE MIN_CONST(IOV_MAX, 64)
struct QEMUFile {
- const QEMUFileHooks *hooks;
QIOChannel *ioc;
bool is_writable;
@@ -147,11 +146,6 @@ QEMUFile *qemu_file_new_input(QIOChannel *ioc)
return qemu_file_new_impl(ioc, false);
}
-void qemu_file_set_hooks(QEMUFile *f, const QEMUFileHooks *hooks)
-{
- f->hooks = hooks;
-}
-
/*
* Get last error for stream f with optional Error*
*
diff --git a/migration/rdma.c b/migration/rdma.c
index b506b86b47..b85259263a 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -4010,13 +4010,6 @@ err:
return ret;
}
-static const QEMUFileHooks rdma_read_hooks = {
-};
-
-static const QEMUFileHooks rdma_write_hooks = {
-};
-
-
static void qio_channel_rdma_finalize(Object *obj)
{
QIOChannelRDMA *rioc = QIO_CHANNEL_RDMA(obj);
@@ -4075,12 +4068,10 @@ static QEMUFile *qemu_fopen_rdma(RDMAContext *rdma,
const char *mode)
rioc->file = qemu_file_new_output(QIO_CHANNEL(rioc));
rioc->rdmaout = rdma;
rioc->rdmain = rdma->return_path;
- qemu_file_set_hooks(rioc->file, &rdma_write_hooks);
} else {
rioc->file = qemu_file_new_input(QIO_CHANNEL(rioc));
rioc->rdmain = rdma;
rioc->rdmaout = rdma->return_path;
- qemu_file_set_hooks(rioc->file, &rdma_read_hooks);
}
return rioc->file;
--
2.40.1
- [PULL 06/21] migration: Don't abuse qemu_file transferred for RDMA, (continued)
- [PULL 06/21] migration: Don't abuse qemu_file transferred for RDMA, Juan Quintela, 2023/05/30
- [PULL 07/21] migration/RDMA: It is accounting for zero/normal pages in two places, Juan Quintela, 2023/05/30
- [PULL 09/21] migration/rdma: Don't use imaginary transfers, Juan Quintela, 2023/05/30
- [PULL 11/21] migration/rdma: Simplify the function that saves a page, Juan Quintela, 2023/05/30
- [PULL 04/21] migration: switch from .vm_was_running to .vm_old_state, Juan Quintela, 2023/05/30
- [PULL 02/21] migration: never fail in global_state_store(), Juan Quintela, 2023/05/30
- [PULL 05/21] migration: restore vmstate on migration failure, Juan Quintela, 2023/05/30
- [PULL 08/21] migration/rdma: Remove QEMUFile parameter when not used, Juan Quintela, 2023/05/30
- [PULL 10/21] migration: Remove unused qemu_file_credit_transfer(), Juan Quintela, 2023/05/30
- [PULL 14/21] migration/rdma: Unfold ram_control_after_iterate(), Juan Quintela, 2023/05/30
- [PULL 18/21] qemu-file: Remove QEMUFileHooks,
Juan Quintela <=
- [PULL 16/21] migration/rdma: Unfold hook_ram_load(), Juan Quintela, 2023/05/30
- [PULL 19/21] migration/rdma: Move rdma constants from qemu-file.h to rdma.h, Juan Quintela, 2023/05/30
- [PULL 15/21] migration/rdma: Remove all uses of RAM_CONTROL_HOOK, Juan Quintela, 2023/05/30
- [PULL 21/21] migration/rdma: Check sooner if we are in postcopy for save_page(), Juan Quintela, 2023/05/30
- [PULL 12/21] migration: Create migrate_rdma(), Juan Quintela, 2023/05/30
- [PULL 13/21] migration/rdma: Unfold ram_control_before_iterate(), Juan Quintela, 2023/05/30
- [PULL 17/21] migration/rdma: Create rdma_control_save_page(), Juan Quintela, 2023/05/30
- [PULL 20/21] migration/rdma: Remove qemu_ prefix from exported functions, Juan Quintela, 2023/05/30
- Re: [PULL 00/21] Migration 20230530 patches, Richard Henderson, 2023/05/30