[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 13/16] qemu-file: Remove QEMUFileHooks
|
From: |
Juan Quintela |
|
Subject: |
[PATCH v2 13/16] qemu-file: Remove QEMUFileHooks |
|
Date: |
Wed, 3 May 2023 15:18:44 +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 c984a2840a..78d8f5a199 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -4021,13 +4021,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);
@@ -4086,12 +4079,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 v2 09/16] migration/rdma: Remove all uses of RAM_CONTROL_HOOK, (continued)
- [PATCH v2 09/16] migration/rdma: Remove all uses of RAM_CONTROL_HOOK, Juan Quintela, 2023/05/03
- [PATCH v2 10/16] migration/rdma: Unfold hook_ram_load(), Juan Quintela, 2023/05/03
- [PATCH v2 11/16] migration/rdma: Make ram_control_save_page() use exported interfaces, Juan Quintela, 2023/05/03
- [PATCH v2 06/16] migration/rdma: We can calculate the rioc from the QEMUFile, Juan Quintela, 2023/05/03
- [PATCH v2 15/16] migration/rdma: Remove qemu_ prefix from exported functions, Juan Quintela, 2023/05/03
- [PATCH v2 14/16] migration/rdma: Move rdma constants from qemu-file.h to rdma.h, Juan Quintela, 2023/05/03
- [PATCH v2 16/16] migration/rdma: If we are in postcopy don't do anything, Juan Quintela, 2023/05/03
- [PATCH v2 03/16] migration/rdma: Unfold ram_control_after_iterate(), Juan Quintela, 2023/05/03
- [PATCH v2 08/16] migration: Make RAM_SAVE_FLAG_HOOK a normal case entry, Juan Quintela, 2023/05/03
- [PATCH v2 07/16] migration/rdma: It makes no sense to recive that flag without RDMA, Juan Quintela, 2023/05/03
- [PATCH v2 13/16] qemu-file: Remove QEMUFileHooks,
Juan Quintela <=
- [PATCH v2 04/16] migration/rdma: simplify ram_control_load_hook(), Juan Quintela, 2023/05/03
- [PATCH v2 05/16] migration/rdma: Don't pass the QIOChannelRDMA as an opaque, Juan Quintela, 2023/05/03
- [PATCH v2 12/16] migration/rdma: Create rdma_control_save_page(), Juan Quintela, 2023/05/03