From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Cc: qemu-devel@nongnu.org, peterx@redhat.com, qemu-block@nongnu.org,
leiyang@redhat.com, marcandre.lureau@redhat.com,
"Eric Blake" <eblake@redhat.com>, "Kevin Wolf" <kwolf@redhat.com>,
"Hanna Reitz" <hreitz@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Elena Ufimtseva" <elena.ufimtseva@oracle.com>,
"Jagannathan Raman" <jag.raman@oracle.com>,
"John Levon" <john.levon@nutanix.com>,
"Thanos Makatos" <thanos.makatos@nutanix.com>,
"Cédric Le Goater" <clg@redhat.com>, "Fam Zheng" <fam@euphon.net>,
"Zhao Liu" <zhao1.liu@intel.com>, "Coiby Xu" <Coiby.Xu@gmail.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Stefano Garzarella" <sgarzare@redhat.com>
Subject: Re: [PATCH v4 04/12] handle result of qio_channel_set_blocking()
Date: Tue, 16 Sep 2025 09:22:36 +0100 [thread overview]
Message-ID: <aMkeTEfsqJJSsLc6@redhat.com> (raw)
In-Reply-To: <20250915193105.230085-5-vsementsov@yandex-team.ru>
On Mon, Sep 15, 2025 at 10:30:56PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> Currently, we just always pass NULL as errp argument. That doesn't
> look good.
>
> Some realizations of interface may actually report errors.
> Channel-socket realization actually either ignore or crash on
> errors, but we are going to straighten it out to always reporting
> an errp in further commits.
>
> So, convert all callers to either handle the error (where environment
> allows) or explicitly use &error_abort.
>
> Take also a chance to change the return value to more convenient
> bool (keeping also in mind, that underlying realizations may
> return -1 on failure, not -errno).
>
> Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> ---
> block/nbd.c | 4 +++-
> chardev/char-socket.c | 20 ++++++++++++++++----
> hw/remote/proxy.c | 6 +++++-
> hw/remote/remote-obj.c | 6 +++++-
> hw/vfio-user/proxy.c | 11 ++++++++---
> include/io/channel.h | 6 +++---
> io/channel.c | 4 ++--
> nbd/server.c | 4 +++-
> scsi/qemu-pr-helper.c | 9 ++++++---
> tests/unit/io-channel-helpers.c | 5 +++--
> tests/unit/test-io-channel-tls.c | 4 ++--
> tools/i386/qemu-vmsr-helper.c | 6 ++++--
> ui/vnc.c | 2 +-
> util/vhost-user-server.c | 7 ++++++-
> 14 files changed, 67 insertions(+), 27 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2025-09-16 8:23 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-15 19:30 [PATCH v4 00/12] io: deal with blocking/non-blocking fds Vladimir Sementsov-Ogievskiy
2025-09-15 19:30 ` [PATCH v4 01/12] char-socket: tcp_chr_recv(): drop extra _set_(block, cloexec) Vladimir Sementsov-Ogievskiy
2025-09-15 19:30 ` [PATCH v4 02/12] char-socket: tcp_chr_recv(): add comment Vladimir Sementsov-Ogievskiy
2025-09-15 19:30 ` [PATCH v4 03/12] util: add qemu_set_blocking() function Vladimir Sementsov-Ogievskiy
2025-09-15 19:30 ` [PATCH v4 04/12] handle result of qio_channel_set_blocking() Vladimir Sementsov-Ogievskiy
2025-09-16 8:22 ` Daniel P. Berrangé [this message]
2025-09-15 19:30 ` [PATCH v4 05/12] migration: qemu_file_set_blocking(): add errp parameter Vladimir Sementsov-Ogievskiy
2025-09-15 20:18 ` Peter Xu
2025-09-16 5:42 ` Vladimir Sementsov-Ogievskiy
2025-09-16 8:28 ` Daniel P. Berrangé
2025-09-16 13:01 ` Vladimir Sementsov-Ogievskiy
2025-09-16 13:51 ` Peter Xu
2025-09-16 15:15 ` Daniel P. Berrangé
2025-09-15 19:30 ` [PATCH v4 06/12] util: drop qemu_socket_set_nonblock() Vladimir Sementsov-Ogievskiy
2025-09-16 8:33 ` Daniel P. Berrangé
2025-09-16 13:02 ` Vladimir Sementsov-Ogievskiy
2025-09-15 19:30 ` [PATCH v4 07/12] util: drop qemu_socket_try_set_nonblock() Vladimir Sementsov-Ogievskiy
2025-09-15 19:31 ` [PATCH v4 08/12] io/channel-socket: rework qio_channel_socket_copy_fds() Vladimir Sementsov-Ogievskiy
2025-09-15 19:31 ` [PATCH v4 09/12] util: drop qemu_socket_set_block() Vladimir Sementsov-Ogievskiy
2025-09-15 19:31 ` [PATCH v4 10/12] use qemu_set_blocking instead of g_unix_set_fd_nonblocking Vladimir Sementsov-Ogievskiy
2025-09-15 19:31 ` [PATCH v4 11/12] chardev: qemu_chr_open_fd(): add errp Vladimir Sementsov-Ogievskiy
2025-09-15 19:31 ` [PATCH v4 12/12] chardev: close an fd on failure path Vladimir Sementsov-Ogievskiy
2025-09-15 19:32 ` [PATCH v4 00/12] io: deal with blocking/non-blocking fds Vladimir Sementsov-Ogievskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aMkeTEfsqJJSsLc6@redhat.com \
--to=berrange@redhat.com \
--cc=Coiby.Xu@gmail.com \
--cc=clg@redhat.com \
--cc=eblake@redhat.com \
--cc=elena.ufimtseva@oracle.com \
--cc=fam@euphon.net \
--cc=hreitz@redhat.com \
--cc=jag.raman@oracle.com \
--cc=john.levon@nutanix.com \
--cc=kwolf@redhat.com \
--cc=leiyang@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=sgarzare@redhat.com \
--cc=thanos.makatos@nutanix.com \
--cc=vsementsov@yandex-team.ru \
--cc=zhao1.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).