summary refs log tree commit diff stats
path: root/migration/qemu-file.c
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>2025-09-10 22:31:11 +0300
committerDaniel P. Berrangé <berrange@redhat.com>2025-09-19 12:46:06 +0100
commit7bc2cbe3306899559c4da1b05e410235d994e22d (patch)
tree3ae9d82cdac50e141a2629c679794288fbc17cf6 /migration/qemu-file.c
parente5eacba4a3e6efdae8cda323f9a2ab5cfb1d0492 (diff)
downloadfocaccia-qemu-7bc2cbe3306899559c4da1b05e410235d994e22d.tar.gz
focaccia-qemu-7bc2cbe3306899559c4da1b05e410235d994e22d.zip
migration/qemu-file: don't make incoming fds blocking again
In migration we want to pass fd "as is", not changing its
blocking status.

The only current user of these fds is CPR state (through VMSTATE_FD),
which of-course doesn't want to modify fds on target when source is
still running and use these fds.

Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'migration/qemu-file.c')
-rw-r--r--migration/qemu-file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/migration/qemu-file.c b/migration/qemu-file.c
index b6ac190034..d5c6e7ec61 100644
--- a/migration/qemu-file.c
+++ b/migration/qemu-file.c
@@ -340,7 +340,8 @@ static ssize_t coroutine_mixed_fn qemu_fill_buffer(QEMUFile *f)
 
     do {
         struct iovec iov = { f->buf + pending, IO_BUF_SIZE - pending };
-        len = qio_channel_readv_full(f->ioc, &iov, 1, pfds, pnfd, 0,
+        len = qio_channel_readv_full(f->ioc, &iov, 1, pfds, pnfd,
+                                     QIO_CHANNEL_READ_FLAG_FD_PRESERVE_BLOCKING,
                                      &local_error);
         if (len == QIO_CHANNEL_ERR_BLOCK) {
             if (qemu_in_coroutine()) {