On 20.08.25 16:30, Peter Xu wrote:
On Wed, Aug 13, 2025 at 07:48:48PM +0300, Vladimir Sementsov-Ogievskiy wrote:
For migration channel keep fds non-blocking property as is.
It's needed for future local migration of fds.
It is pretty risky. This changes the attribute for all the iochannels that
migration incoming side uses, including multifd / postcopy / ...
But for now nobody (except CPR-transfer) really pass fds through migration,
and for CPR-transfer it's obviously better to preserve the state by default (see
my answer in previous patch).
So I think, we are in a point, where we can chose the good default, and
document it.
I left comment in previous patch as a pure question trying to understand
whether the feature is needed. If it is, here it might still be good to:
- Above the line add a comment explaning why
- Only apply it to whatever channel that matters. In this case, IIUC
only the main channel matters
I still think that preserving non-blocking flag "as is" is good default for
migration,
please look at my answer in previous patch. However, in this series I may adopt
to any approach.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru>
---
migration/socket.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/migration/socket.c b/migration/socket.c
index 5ec65b8c03..9f7b6919cf 100644
--- a/migration/socket.c
+++ b/migration/socket.c
@@ -129,6 +129,7 @@ static void socket_accept_incoming_migration(QIONetListener
*listener,
}
qio_channel_set_name(QIO_CHANNEL(cioc), "migration-socket-incoming");
+ qio_channel_socket_keep_nonblock(QIO_CHANNEL(cioc));
migration_channel_process_incoming(QIO_CHANNEL(cioc));
}
--
2.48.1
--
Best regards,
Vladimir