diff options
| author | Fabiano Rosas <farosas@suse.de> | 2024-02-29 12:30:12 -0300 |
|---|---|---|
| committer | Peter Xu <peterx@redhat.com> | 2024-03-01 15:42:04 +0800 |
| commit | 2dd7ee7a51bc0a90abe410d6223b297cf2925e4f (patch) | |
| tree | de69df5522741d06c28d23d0e37b73d2ddbe73c7 /migration/multifd.c | |
| parent | b7b03eb614d01079f9b1f7a1d342140b5055a559 (diff) | |
| download | focaccia-qemu-2dd7ee7a51bc0a90abe410d6223b297cf2925e4f.tar.gz focaccia-qemu-2dd7ee7a51bc0a90abe410d6223b297cf2925e4f.zip | |
migration/multifd: Add incoming QIOChannelFile support
On the receiving side we don't need to differentiate between main channel and threads, so whichever channel is defined first gets to be the main one. And since there are no packets, use the atomic channel count to index into the params array. Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de> Link: https://lore.kernel.org/r/20240229153017.2221-19-farosas@suse.de Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'migration/multifd.c')
| -rw-r--r-- | migration/multifd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/migration/multifd.c b/migration/multifd.c index caef1076ca..ea08f1aa9e 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -1545,8 +1545,7 @@ void multifd_recv_new_channel(QIOChannel *ioc, Error **errp) } trace_multifd_recv_new_channel(id); } else { - /* next patch gives this a meaningful value */ - id = 0; + id = qatomic_read(&multifd_recv_state->count); } p = &multifd_recv_state->params[id]; |