[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 18/19] qemu-file: Remove QEMUFileHooks
From: |
Juan Quintela |
Subject: |
[PATCH 18/19] qemu-file: Remove QEMUFileHooks |
Date: |
Thu, 27 Apr 2023 18:34:48 +0200 |
The only user was rdma, and its use is gone.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/qemu-file.c | 6 ------
migration/qemu-file.h | 4 ----
migration/rdma.c | 9 ---------
3 files changed, 19 deletions(-)
diff --git a/migration/qemu-file.c b/migration/qemu-file.c
index 8d3f33fe41..c0c2195a6e 100644
--- a/migration/qemu-file.c
+++ b/migration/qemu-file.c
@@ -36,7 +36,6 @@
#define MAX_IOV_SIZE MIN_CONST(IOV_MAX, 64)
struct QEMUFile {
- const QEMUFileHooks *hooks;
QIOChannel *ioc;
bool is_writable;
@@ -160,11 +159,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/qemu-file.h b/migration/qemu-file.h
index ae3a704772..9c99914b21 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/rdma.c b/migration/rdma.c
index 42ac7fd1e2..63492fd4ac 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -4001,13 +4001,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);
@@ -4066,12 +4059,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.0
- [PATCH 05/19] migration/rdma: Split the zero page case from acct_update_position, (continued)
- [PATCH 05/19] migration/rdma: Split the zero page case from acct_update_position, Juan Quintela, 2023/04/27
- [PATCH 09/19] migration/rdma: simplify ram_control_load_hook(), Juan Quintela, 2023/04/27
- [PATCH 13/19] migration: Make RAM_SAVE_FLAG_HOOK a normal case entry, Juan Quintela, 2023/04/27
- [PATCH 14/19] migration/rdma: Remove all uses of RAM_CONTROL_HOOK, Juan Quintela, 2023/04/27
- [PATCH 17/19] migration/rdma: Create rdma_control_save_page(), Juan Quintela, 2023/04/27
- [PATCH 19/19] migration/rdma: Move rdma constants from qemu-file.h to rdma.h, Juan Quintela, 2023/04/27
- [PATCH 11/19] migration/rdma: We can calculate the rioc from the QEMUFile, Juan Quintela, 2023/04/27
- [PATCH 03/19] migration: Rename ram_counters to mig_stats, Juan Quintela, 2023/04/27
- [PATCH 18/19] qemu-file: Remove QEMUFileHooks,
Juan Quintela <=
- [PATCH 16/19] migration/rdma: Make ram_control_save_page() use exported interfaces, Juan Quintela, 2023/04/27
- [PATCH 10/19] migration/rdma: Don't pass the QIOChannelRDMA as an opaque, Juan Quintela, 2023/04/27
- [PATCH 15/19] migration/rdma: Unfold hook_ram_load(), Juan Quintela, 2023/04/27
- [PATCH 08/19] migration/rdma: Unflod ram_control_after_iterate(), Juan Quintela, 2023/04/27