From: "Daniel P. Berrangé" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, "Daniel P. Berrangé" <berrange@redhat.com>,
"Juan Quintela" <quintela@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Hailiang Zhang" <zhang.zhanghailiang@huawei.com>,
"Fam Zheng" <fam@euphon.net>,
"Hailiang Zhang" <zhanghailiang@xfusion.com>,
"Eric Blake" <eblake@redhat.com>
Subject: [PATCH v2 02/21] migration: switch to use QIOChannelNull for dummy channel
Date: Mon, 20 Jun 2022 12:01:46 +0100 [thread overview]
Message-ID: <20220620110205.1357829-3-berrange@redhat.com> (raw)
In-Reply-To: <20220620110205.1357829-1-berrange@redhat.com>
This removes one further custom impl of QEMUFile, in favour of a
QIOChannel based impl.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
migration/ram.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index 5f5e37f64d..89082716d6 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -32,11 +32,13 @@
#include "qemu/bitmap.h"
#include "qemu/madvise.h"
#include "qemu/main-loop.h"
+#include "io/channel-null.h"
#include "xbzrle.h"
#include "ram.h"
#include "migration.h"
#include "migration/register.h"
#include "migration/misc.h"
+#include "migration/qemu-file-channel.h"
#include "qemu-file.h"
#include "postcopy-ram.h"
#include "page_cache.h"
@@ -457,8 +459,6 @@ static QemuThread *compress_threads;
*/
static QemuMutex comp_done_lock;
static QemuCond comp_done_cond;
-/* The empty QEMUFileOps will be used by file in CompressParam */
-static const QEMUFileOps empty_ops = { };
static QEMUFile *decomp_file;
static DecompressParam *decomp_param;
@@ -569,7 +569,8 @@ static int compress_threads_save_setup(void)
/* comp_param[i].file is just used as a dummy buffer to save data,
* set its ops to empty.
*/
- comp_param[i].file = qemu_fopen_ops(NULL, &empty_ops, false);
+ comp_param[i].file = qemu_fopen_channel_output(
+ QIO_CHANNEL(qio_channel_null_new()));
comp_param[i].done = true;
comp_param[i].quit = false;
qemu_mutex_init(&comp_param[i].mutex);
--
2.36.1
next prev parent reply other threads:[~2022-06-20 11:04 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-20 11:01 [PATCH v2 00/21] migration: remove QEMUFileOps concept and assume use of QIOChannel Daniel P. Berrangé
2022-06-20 11:01 ` [PATCH v2 01/21] io: add a QIOChannelNull equivalent to /dev/null Daniel P. Berrangé
2022-06-20 12:44 ` Juan Quintela
2022-06-20 11:01 ` Daniel P. Berrangé [this message]
2022-06-20 12:45 ` [PATCH v2 02/21] migration: switch to use QIOChannelNull for dummy channel Juan Quintela
2022-06-20 11:01 ` [PATCH v2 03/21] migration: remove unreachble RDMA code in save_hook impl Daniel P. Berrangé
2022-06-20 15:11 ` Juan Quintela
2022-06-20 11:01 ` [PATCH v2 04/21] migration: rename rate limiting fields in QEMUFile Daniel P. Berrangé
2022-06-20 15:11 ` Juan Quintela
2022-06-20 11:01 ` [PATCH v2 05/21] migration: rename 'pos' field in QEMUFile to 'bytes_processed' Daniel P. Berrangé
2022-06-20 15:12 ` Juan Quintela
2022-06-20 11:01 ` [PATCH v2 06/21] migration: rename qemu_ftell to qemu_file_total_transferred Daniel P. Berrangé
2022-06-20 15:13 ` Juan Quintela
2022-06-20 11:01 ` [PATCH v2 07/21] migration: rename qemu_update_position to qemu_file_credit_transfer Daniel P. Berrangé
2022-06-20 15:14 ` Juan Quintela
2022-06-20 11:01 ` [PATCH v2 08/21] migration: rename qemu_file_update_transfer to qemu_file_acct_rate_limit Daniel P. Berrangé
2022-06-20 14:36 ` Dr. David Alan Gilbert
2022-06-20 15:15 ` Juan Quintela
2022-06-20 11:01 ` [PATCH v2 09/21] migration: introduce a QIOChannel impl for BlockDriverState VMState Daniel P. Berrangé
2022-06-20 15:17 ` Juan Quintela
2022-06-21 15:40 ` Juan Quintela
2022-06-21 15:42 ` Daniel P. Berrangé
2022-06-20 11:01 ` [PATCH v2 10/21] migration: convert savevm to use QIOChannelBlock for VMState Daniel P. Berrangé
2022-06-20 15:19 ` Juan Quintela
2022-06-20 11:01 ` [PATCH v2 11/21] migration: stop passing 'opaque' parameter to QEMUFile hooks Daniel P. Berrangé
2022-06-20 15:20 ` Juan Quintela
2022-06-20 11:01 ` [PATCH v2 12/21] migration: hardcode assumption that QEMUFile is backed with QIOChannel Daniel P. Berrangé
2022-06-20 15:21 ` Juan Quintela
2022-06-20 11:01 ` [PATCH v2 13/21] migration: introduce new constructors for QEMUFile Daniel P. Berrangé
2022-06-20 15:27 ` Juan Quintela
2022-06-20 11:01 ` [PATCH v2 14/21] migration: remove unused QEMUFileGetFD typedef / qemu_get_fd method Daniel P. Berrangé
2022-06-20 15:28 ` Juan Quintela
2022-06-20 11:01 ` [PATCH v2 15/21] migration: remove the QEMUFileOps 'shut_down' callback Daniel P. Berrangé
2022-06-20 15:36 ` Juan Quintela
2022-06-20 11:02 ` [PATCH v2 16/21] migration: remove the QEMUFileOps 'set_blocking' callback Daniel P. Berrangé
2022-06-20 15:39 ` Juan Quintela
2022-06-20 11:02 ` [PATCH v2 17/21] migration: remove the QEMUFileOps 'close' callback Daniel P. Berrangé
2022-06-20 15:40 ` Juan Quintela
2022-06-20 11:02 ` [PATCH v2 18/21] migration: remove the QEMUFileOps 'get_buffer' callback Daniel P. Berrangé
2022-06-20 15:40 ` Juan Quintela
2022-06-27 12:04 ` Dr. David Alan Gilbert
2022-06-20 11:02 ` [PATCH v2 19/21] migration: remove the QEMUFileOps 'writev_buffer' callback Daniel P. Berrangé
2022-06-20 15:43 ` Juan Quintela
2022-06-20 11:02 ` [PATCH v2 20/21] migration: remove the QEMUFileOps 'get_return_path' callback Daniel P. Berrangé
2022-06-20 15:45 ` Juan Quintela
2022-06-20 11:02 ` [PATCH v2 21/21] migration: remove the QEMUFileOps abstraction Daniel P. Berrangé
2022-06-20 15:47 ` Juan Quintela
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220620110205.1357829-3-berrange@redhat.com \
--to=berrange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=fam@euphon.net \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=stefanha@redhat.com \
--cc=zhang.zhanghailiang@huawei.com \
--cc=zhanghailiang@xfusion.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).