diff options
| author | Fabiano Rosas <farosas@suse.de> | 2024-02-29 12:30:11 -0300 |
|---|---|---|
| committer | Peter Xu <peterx@redhat.com> | 2024-03-01 15:42:04 +0800 |
| commit | b7b03eb614d01079f9b1f7a1d342140b5055a559 (patch) | |
| tree | e4f3e7a433c0c517722e15bbdc337e0b5f2f3d3c /migration/file.h | |
| parent | a8a3e7102ccf65ee57fb7427952b98ebb460bec9 (diff) | |
| download | focaccia-qemu-b7b03eb614d01079f9b1f7a1d342140b5055a559.tar.gz focaccia-qemu-b7b03eb614d01079f9b1f7a1d342140b5055a559.zip | |
migration/multifd: Add outgoing QIOChannelFile support
Allow multifd to open file-backed channels. This will be used when enabling the mapped-ram migration stream format which expects a seekable transport. The QIOChannel read and write methods will use the preadv/pwritev versions which don't update the file offset at each call so we can reuse the fd without re-opening for every channel. Contrary to the socket migration, the file migration doesn't need an asynchronous channel creation process, so expose multifd_channel_connect() and call it directly. Note that this is just setup code and multifd cannot yet make use of the file channels. Signed-off-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Peter Xu <peterx@redhat.com> Link: https://lore.kernel.org/r/20240229153017.2221-18-farosas@suse.de Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'migration/file.h')
| -rw-r--r-- | migration/file.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/migration/file.h b/migration/file.h index 37d6a08bfc..4577f9efdd 100644 --- a/migration/file.h +++ b/migration/file.h @@ -9,10 +9,14 @@ #define QEMU_MIGRATION_FILE_H #include "qapi/qapi-types-migration.h" +#include "io/task.h" +#include "channel.h" void file_start_incoming_migration(FileMigrationArgs *file_args, Error **errp); void file_start_outgoing_migration(MigrationState *s, FileMigrationArgs *file_args, Error **errp); int file_parse_offset(char *filespec, uint64_t *offsetp, Error **errp); +void file_cleanup_outgoing_migration(void); +bool file_send_channel_create(gpointer opaque, Error **errp); #endif |