qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] io: deal with blocking/non-blocking fds
@ 2025-09-03  9:44 Vladimir Sementsov-Ogievskiy
  2025-09-03  9:44 ` [PATCH 01/10] io/channel: document how qio_channel_readv_full() handles fds Vladimir Sementsov-Ogievskiy
                   ` (11 more replies)
  0 siblings, 12 replies; 44+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2025-09-03  9:44 UTC (permalink / raw)
  To: berrange; +Cc: qemu-devel, qemu-block, peterx, vsementsov

Hi all!

The series brings two things:

1. unify code which sets fds blocking/non-blocking through the whole
source

2. for fds, which comes from qio_channel_readv_full(), stop making
them blocking in generic code, and move this logic to the callers,
all except coming from migration qemu-file (see last patch)

Vladimir Sementsov-Ogievskiy (10):
  io/channel: document how qio_channel_readv_full() handles fds
  char-socket: rework tcp_chr_recv()
  util: add qemu_set_blocking() function
  util: drop qemu_socket_set_nonblock()
  util: drop qemu_socket_try_set_nonblock()
  util: drop qemu_socket_set_block()
  use qemu_set_blocking instead of g_unix_set_fd_nonblocking
  oslib-posix: add qemu_fds_set_blocking() helper
  qio_channel_readv_full(): move setting fd blocking to callers
  migration/qemu-file: don't make incoming fds blocking again

 chardev/char-fd.c                       |  4 +--
 chardev/char-pty.c                      |  3 +-
 chardev/char-serial.c                   |  3 +-
 chardev/char-socket.c                   | 45 ++++++++++++-------------
 chardev/char-stdio.c                    |  3 +-
 contrib/ivshmem-server/ivshmem-server.c |  5 ++-
 hw/hyperv/syndbg.c                      |  4 ++-
 hw/input/virtio-input-host.c            |  3 +-
 hw/misc/ivshmem-flat.c                  |  4 ++-
 hw/misc/ivshmem-pci.c                   |  8 ++++-
 hw/remote/mpqemu-link.c                 |  3 ++
 hw/vfio-user/proxy.c                    |  4 +++
 hw/virtio/vhost-user.c                  | 10 +++++-
 hw/virtio/vhost-vsock.c                 |  8 ++---
 include/io/channel.h                    | 12 +++++++
 include/qemu/osdep.h                    |  8 +++++
 include/qemu/sockets.h                  |  3 --
 io/channel-command.c                    |  9 +++--
 io/channel-file.c                       |  3 +-
 io/channel-socket.c                     | 26 +++++++-------
 net/dgram.c                             | 28 ++++++++-------
 net/l2tpv3.c                            |  5 +--
 net/socket.c                            | 27 ++++++++++-----
 net/stream.c                            |  9 ++---
 net/stream_data.c                       | 10 +++---
 net/tap-bsd.c                           | 12 +++++--
 net/tap-linux.c                         |  8 ++++-
 net/tap-solaris.c                       |  7 +++-
 net/tap.c                               | 21 ++++--------
 qga/channel-posix.c                     |  7 +++-
 qga/commands-posix.c                    |  3 +-
 scsi/qemu-pr-helper.c                   |  4 +++
 tests/qtest/fuzz/virtio_net_fuzz.c      |  2 +-
 tests/qtest/tpm-emu.c                   |  1 +
 tests/qtest/vhost-user-test.c           |  3 +-
 tests/unit/socket-helpers.c             |  5 ++-
 tests/unit/test-crypto-tlssession.c     |  8 ++---
 tests/unit/test-io-channel-socket.c     |  1 +
 tests/unit/test-iov.c                   |  5 +--
 ui/input-linux.c                        |  3 +-
 util/event_notifier-posix.c             |  5 +--
 util/main-loop.c                        |  6 +++-
 util/oslib-posix.c                      | 27 +++++++++------
 util/oslib-win32.c                      | 25 ++++++--------
 util/vhost-user-server.c                |  9 +++--
 45 files changed, 244 insertions(+), 165 deletions(-)

-- 
2.48.1



^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2025-09-12 14:52 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-03  9:44 [PATCH 00/10] io: deal with blocking/non-blocking fds Vladimir Sementsov-Ogievskiy
2025-09-03  9:44 ` [PATCH 01/10] io/channel: document how qio_channel_readv_full() handles fds Vladimir Sementsov-Ogievskiy
2025-09-09  8:34   ` Daniel P. Berrangé
2025-09-03  9:44 ` [PATCH 02/10] char-socket: rework tcp_chr_recv() Vladimir Sementsov-Ogievskiy
2025-09-08 21:53   ` Peter Xu
2025-09-09  7:49     ` Vladimir Sementsov-Ogievskiy
2025-09-09  8:38   ` Daniel P. Berrangé
2025-09-09  8:46     ` Vladimir Sementsov-Ogievskiy
2025-09-03  9:44 ` [PATCH 03/10] util: add qemu_set_blocking() function Vladimir Sementsov-Ogievskiy
2025-09-08 22:02   ` Peter Xu
2025-09-09  7:51     ` Vladimir Sementsov-Ogievskiy
2025-09-09  8:59   ` Daniel P. Berrangé
2025-09-03  9:44 ` [PATCH 04/10] util: drop qemu_socket_set_nonblock() Vladimir Sementsov-Ogievskiy
2025-09-08 22:16   ` Peter Xu
2025-09-09  8:19     ` Vladimir Sementsov-Ogievskiy
2025-09-10  9:41       ` Daniel P. Berrangé
2025-09-10 10:32         ` Vladimir Sementsov-Ogievskiy
2025-09-10  9:44   ` Daniel P. Berrangé
2025-09-10 10:33     ` Vladimir Sementsov-Ogievskiy
2025-09-10 15:30       ` Vladimir Sementsov-Ogievskiy
2025-09-10 17:55     ` Vladimir Sementsov-Ogievskiy
2025-09-10 18:15       ` Daniel P. Berrangé
2025-09-10 18:52         ` Vladimir Sementsov-Ogievskiy
2025-09-12 14:51           ` Daniel P. Berrangé
2025-09-03  9:44 ` [PATCH 05/10] util: drop qemu_socket_try_set_nonblock() Vladimir Sementsov-Ogievskiy
2025-09-09  0:09   ` Peter Xu
2025-09-03  9:44 ` [PATCH 06/10] util: drop qemu_socket_set_block() Vladimir Sementsov-Ogievskiy
2025-09-03  9:44 ` [PATCH 07/10] use qemu_set_blocking instead of g_unix_set_fd_nonblocking Vladimir Sementsov-Ogievskiy
2025-09-09  9:00   ` Daniel P. Berrangé
2025-09-09  9:11     ` Vladimir Sementsov-Ogievskiy
2025-09-09  9:15       ` Daniel P. Berrangé
2025-09-09  9:50         ` Vladimir Sementsov-Ogievskiy
2025-09-10  9:32           ` Daniel P. Berrangé
2025-09-09 14:24   ` Stefan Hajnoczi
2025-09-03  9:44 ` [PATCH 08/10] oslib-posix: add qemu_fds_set_blocking() helper Vladimir Sementsov-Ogievskiy
2025-09-03  9:48   ` Vladimir Sementsov-Ogievskiy
2025-09-10  9:52   ` Daniel P. Berrangé
2025-09-10 10:42     ` Vladimir Sementsov-Ogievskiy
2025-09-03  9:44 ` [PATCH 09/10] qio_channel_readv_full(): move setting fd blocking to callers Vladimir Sementsov-Ogievskiy
2025-09-03  9:44 ` [PATCH 10/10] migration/qemu-file: don't make incoming fds blocking again Vladimir Sementsov-Ogievskiy
2025-09-03  9:47   ` Vladimir Sementsov-Ogievskiy
2025-09-04 14:35 ` [PATCH 00/10] io: deal with blocking/non-blocking fds Lei Yang
2025-09-09  8:12 ` Vladimir Sementsov-Ogievskiy
2025-09-09 14:25   ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).