diff options
author | Juan Quintela <quintela@redhat.com> | 2023-03-01 22:17:14 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2023-04-24 15:01:46 +0200 |
commit | b4bc342c766640e0cb8a0b72f71e0ee5545fb790 (patch) | |
tree | edee1d8f3cba46a6e03c26b1a051174d1c30076b /migration/multifd.c | |
parent | 51b07548f7c31793adc178c7460c5f4369733c61 (diff) | |
download | qemu-b4bc342c766640e0cb8a0b72f71e0ee5545fb790.zip qemu-b4bc342c766640e0cb8a0b72f71e0ee5545fb790.tar.gz qemu-b4bc342c766640e0cb8a0b72f71e0ee5545fb790.tar.bz2 |
migration: Move migrate_use_zero_copy_send() to options.c
Once that we are there, we rename the function to
migrate_zero_copy_send() to be consistent with all other capabilities.
We can remove the CONFIG_LINUX guard. We already check that we can't
setup this capability in migrate_caps_check().
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Diffstat (limited to 'migration/multifd.c')
-rw-r--r-- | migration/multifd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/migration/multifd.c b/migration/multifd.c index 6807328..cce3ad6 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -25,7 +25,7 @@ #include "trace.h" #include "multifd.h" #include "threadinfo.h" - +#include "options.h" #include "qemu/yank.h" #include "io/channel-socket.h" #include "yank_functions.h" @@ -608,7 +608,7 @@ int multifd_send_sync_main(QEMUFile *f) * all the dirty bitmaps. */ - flush_zero_copy = migrate_use_zero_copy_send(); + flush_zero_copy = migrate_zero_copy_send(); for (i = 0; i < migrate_multifd_channels(); i++) { MultiFDSendParams *p = &multifd_send_state->params[i]; @@ -653,7 +653,7 @@ static void *multifd_send_thread(void *opaque) MigrationThread *thread = NULL; Error *local_err = NULL; int ret = 0; - bool use_zero_copy_send = migrate_use_zero_copy_send(); + bool use_zero_copy_send = migrate_zero_copy_send(); thread = MigrationThreadAdd(p->name, qemu_get_thread_id()); @@ -945,7 +945,7 @@ int multifd_save_setup(Error **errp) p->page_size = qemu_target_page_size(); p->page_count = page_count; - if (migrate_use_zero_copy_send()) { + if (migrate_zero_copy_send()) { p->write_flags = QIO_CHANNEL_WRITE_FLAG_ZERO_COPY; } else { p->write_flags = 0; |