From: Paolo Bonzini <pbonzini@redhat.com>
To: ronnie sahlberg <ronniesahlberg@gmail.com>, Peter Lieven <pl@kamp.de>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Stefan Hajnoczi <stefanha@redhat.com>,
qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-stable] Recent patches for 2.4
Date: Wed, 5 Aug 2015 10:39:54 +0200 [thread overview]
Message-ID: <55C1CBDA.6050803@redhat.com> (raw)
In-Reply-To: <CAN05THSN09B94JZ9DQ1AV6JKKmNhjKZ9mEHoExodfQ-grukK5w@mail.gmail.com>
On 05/08/2015 01:23, ronnie sahlberg wrote:
>
> You only get >0 from this call if there are actual bytes available to read.
>
> For context, the problem was that
>
>
> 75 static void nfs_process_read(void *arg)
> 76 {
> 77 NFSClient *client = arg;
> 78 nfs_service(client->context, POLLIN);
> 79 nfs_set_events(client);
> 80 }
>
> sometimes trigger and call nfs_service(POLLIN) eventhough the socket is
> not readable.
Does read() return -1/EAGAIN or 0?
If it returns 0, then this is expected: it means that the other side has
shutdown the socket's write-side. libnfs should either reconnect, or
disable POLLIN, treat all pending operations as aborted and stop
submitting more.
Paolo
> I verified this by adding an extra call to poll() at around line 78
> to check whether POLLIN was actually set on the fd or not. Sometimes it
> would not be but I got lost in the sources and could not find if or
> where this happens or even if qemu even guarantees "only call the POLLIN
> callbacks if the filedescriptor is actually readable".
>
next prev parent reply other threads:[~2015-08-05 8:40 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-31 8:12 [Qemu-devel] Recent patches for 2.4 Peter Lieven
2015-07-31 8:22 ` Paolo Bonzini
2015-07-31 8:35 ` Peter Lieven
2015-07-31 9:29 ` Paolo Bonzini
2015-08-04 9:22 ` [Qemu-devel] [Qemu-stable] " Peter Lieven
2015-08-04 11:53 ` Paolo Bonzini
2015-08-04 11:57 ` Peter Lieven
2015-08-04 12:09 ` Paolo Bonzini
2015-08-04 12:29 ` Peter Lieven
2015-08-04 12:53 ` Peter Lieven
2015-08-04 23:23 ` ronnie sahlberg
2015-08-05 8:39 ` Paolo Bonzini [this message]
2015-08-06 7:51 ` Peter Lieven
2015-09-03 13:11 ` Peter Lieven
2015-09-07 16:28 ` Paolo Bonzini
2015-09-07 19:11 ` Peter Lieven
2015-09-07 19:14 ` Paolo Bonzini
2015-09-07 21:05 ` Peter Lieven
2015-09-21 7:40 ` Peter Lieven
2015-09-21 9:41 ` Paolo Bonzini
2015-09-21 9:52 ` Peter Lieven
2015-09-21 12:16 ` Paolo Bonzini
2015-08-04 18:20 ` Michael Roth
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=55C1CBDA.6050803@redhat.com \
--to=pbonzini@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=ronniesahlberg@gmail.com \
--cc=stefanha@redhat.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 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.