From: Eric Blake <eblake@redhat.com>
To: guillaume vincke <guillaume.vincke@ovhcloud.com>
Cc: berrange@redhat.com, qemu-devel@nongnu.org,
qemu-block@nongnu.org,
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,
Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>
Subject: Re: [PATCH v4 1/3] nbd/client-connection: Fix client returning a closed channel
Date: Thu, 3 Dec 2026 11:31:49 -0600 [thread overview]
Message-ID: <axGmjkuqEjrceGVJ@redhat.com> (raw)
In-Reply-To: <44fba603-aeec-42ed-9ade-632dd52fc63f@ovhcloud.com>
On Thu, Dec 03, 2026 at 06:17:26PM +0100, guillaume vincke wrote:
> > I'm still struggling to understand why we need to create all these
> > hacks for detecting EOF by peeking at incoming bytes at only one
> > specific place int he code, when the QIOChannel code has a well
> > defined mechanism to detect it - create a I/O watch and look for
> > G_IO_HUP to be signalled.
> >
>
> I did not know this was the expected mechanism. Thanks for pointing
> that out.
> I understand that you consider the peeking to be a hack. The problem
> with TLS is that a read stops after each non-data record so a one-shot
> check cannot tell whether a close_notify is still queued without
> looking at the underlying socket. Your solution would avoid all that
> but it requires attaching the parked channel to the AioContext which
> looks like a bigger change. Would you prefer that solution ?
I also admit to not being aware enough of G_IO_HUP to have been able
to suggest it while reviewing earlier versions. But I would much
rather centralize as much knowledge as we can in the io/ directory,
rather than having to special-case things in the nbd/ directory.
Associating the handshake with the right AioContext seems like the
right approach to pursue, even if it requires a bigger change to get
there.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization: qemu.org | libguestfs.org
next prev parent reply other threads:[~2026-12-03 17:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 12:44 [PATCH v4 0/3] nbd/client-connection: Fix client returning a closed channel Guillaume Vincke
2026-11-30 12:44 ` [PATCH v4 1/3] " Guillaume Vincke
2026-12-01 17:14 ` Daniel P. Berrangé
2026-12-03 12:57 ` guillaume vincke
2026-12-03 16:02 ` Daniel P. Berrangé
2026-12-03 17:17 ` guillaume vincke
2026-12-03 17:29 ` Daniel P. Berrangé
2026-12-03 17:31 ` Eric Blake [this message]
2026-11-30 12:44 ` [PATCH v4 2/3] nbd/client-connection: Fix client returning a closed TLS channel Guillaume Vincke
2026-12-01 16:23 ` Eric Blake
2026-11-30 12:44 ` [PATCH v4 3/3] iotests: Add coverage for NBD connect thread start delay Guillaume Vincke
2026-12-01 17:05 ` Eric Blake
2026-12-03 15:31 ` guillaume vincke
2026-12-03 15:53 ` Eric Blake
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=axGmjkuqEjrceGVJ@redhat.com \
--to=eblake@redhat.com \
--cc=berrange@redhat.com \
--cc=guillaume.vincke@ovhcloud.com \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@yandex-team.ru \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.