[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 19/27] migration/multifd: Add a wrapper for channels_created
From: |
peterx |
Subject: |
[PULL 19/27] migration/multifd: Add a wrapper for channels_created |
Date: |
Mon, 4 Mar 2024 09:26:26 +0800 |
From: Fabiano Rosas <farosas@suse.de>
We'll need to access multifd_send_state->channels_created from outside
multifd.c, so introduce a helper for that.
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240229153017.2221-17-farosas@suse.de
Signed-off-by: Peter Xu <peterx@redhat.com>
---
migration/multifd.h | 1 +
migration/multifd.c | 7 ++++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/migration/multifd.h b/migration/multifd.h
index 1be985978e..1d8bbaf96b 100644
--- a/migration/multifd.h
+++ b/migration/multifd.h
@@ -17,6 +17,7 @@ typedef struct MultiFDRecvData MultiFDRecvData;
bool multifd_send_setup(void);
void multifd_send_shutdown(void);
+void multifd_send_channel_created(void);
int multifd_recv_setup(Error **errp);
void multifd_recv_cleanup(void);
void multifd_recv_shutdown(void);
diff --git a/migration/multifd.c b/migration/multifd.c
index d470af73ba..3574fd3953 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -101,6 +101,11 @@ static bool multifd_use_packets(void)
return !migrate_mapped_ram();
}
+void multifd_send_channel_created(void)
+{
+ qemu_sem_post(&multifd_send_state->channels_created);
+}
+
/* Multifd without compression */
/**
@@ -1023,7 +1028,7 @@ out:
* Here we're not interested whether creation succeeded, only that
* it happened at all.
*/
- qemu_sem_post(&multifd_send_state->channels_created);
+ multifd_send_channel_created();
if (ret) {
return;
--
2.44.0
- [PULL 09/27] migration/qemu-file: add utility methods for working with seekable channels, (continued)
- [PULL 09/27] migration/qemu-file: add utility methods for working with seekable channels, peterx, 2024/03/03
- [PULL 12/27] migration/ram: Add outgoing 'mapped-ram' migration, peterx, 2024/03/03
- [PULL 13/27] migration/ram: Add incoming 'mapped-ram' migration, peterx, 2024/03/03
- [PULL 14/27] tests/qtest/migration: Add tests for mapped-ram file-based migration, peterx, 2024/03/03
- [PULL 16/27] migration/multifd: Decouple recv method from pages, peterx, 2024/03/03
- [PULL 15/27] migration/multifd: Rename MultiFDSend|RecvParams::data to compress_data, peterx, 2024/03/03
- [PULL 21/27] migration/multifd: Add incoming QIOChannelFile support, peterx, 2024/03/03
- [PULL 18/27] migration/multifd: Allow receiving pages without packets, peterx, 2024/03/03
- [PULL 24/27] migration/multifd: Support incoming mapped-ram stream format, peterx, 2024/03/03
- [PULL 17/27] migration/multifd: Allow multifd without packets, peterx, 2024/03/03
- [PULL 19/27] migration/multifd: Add a wrapper for channels_created,
peterx <=
- [PULL 20/27] migration/multifd: Add outgoing QIOChannelFile support, peterx, 2024/03/03
- [PULL 23/27] migration/multifd: Support outgoing mapped-ram stream format, peterx, 2024/03/03
- [PULL 26/27] tests/qtest/migration: Add a multifd + mapped-ram migration test, peterx, 2024/03/03
- [PULL 25/27] migration/multifd: Add mapped-ram support to fd: URI, peterx, 2024/03/03
- [PULL 22/27] migration/multifd: Prepare multifd sync for mapped-ram migration, peterx, 2024/03/03
- [PULL 27/27] migration/multifd: Document two places for mapped-ram, peterx, 2024/03/03