qemu-e2k/io
Leonardo Bras 927f93e099 QIOChannelSocket: Fix zero-copy flush returning code 1 when nothing sent
If flush is called when no buffer was sent with MSG_ZEROCOPY, it currently
returns 1. This return code should be used only when Linux fails to use
MSG_ZEROCOPY on a lot of sendmsg().

Fix this by returning early from flush if no sendmsg(...,MSG_ZEROCOPY)
was attempted.

Fixes: 2bc58ffc29 ("QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX")
Signed-off-by: Leonardo Bras <leobras@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Acked-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: <20220711211112.18951-2-leobras@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2022-07-20 12:15:09 +01:00
..
channel-buffer.c QIOChannel: Add flags on io_writev and introduce io_flush callback 2022-05-16 13:56:24 +01:00
channel-command.c QIOChannel: Add flags on io_writev and introduce io_flush callback 2022-05-16 13:56:24 +01:00
channel-file.c QIOChannel: Add flags on io_writev and introduce io_flush callback 2022-05-16 13:56:24 +01:00
channel-null.c io: add a QIOChannelNull equivalent to /dev/null 2022-06-22 18:11:21 +01:00
channel-socket.c QIOChannelSocket: Fix zero-copy flush returning code 1 when nothing sent 2022-07-20 12:15:09 +01:00
channel-tls.c QIOChannel: Add flags on io_writev and introduce io_flush callback 2022-05-16 13:56:24 +01:00
channel-util.c io: Fix Lesser GPL version number 2020-10-29 09:57:37 +00:00
channel-watch.c io: Fix Lesser GPL version number 2020-10-29 09:57:37 +00:00
channel-websock.c QIOChannel: Add flags on io_writev and introduce io_flush callback 2022-05-16 13:56:24 +01:00
channel.c QIOChannel: Add flags on io_writev and introduce io_flush callback 2022-05-16 13:56:24 +01:00
dns-resolver.c build-sys: add HAVE_IPPROTO_MPTCP 2021-09-30 15:30:25 +02:00
meson.build io: add a QIOChannelNull equivalent to /dev/null 2022-06-22 18:11:21 +01:00
net-listener.c io/net-listener: Call the notifier during finalize 2021-06-08 19:36:17 +01:00
task.c io: Fix Lesser GPL version number 2020-10-29 09:57:37 +00:00
trace-events io: add a QIOChannelNull equivalent to /dev/null 2022-06-22 18:11:21 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00