* [PATCH] idmapd: silence pointless EOF warning
@ 2013-08-12 16:41 J. Bruce Fields
2013-08-19 18:26 ` Steve Dickson
0 siblings, 1 reply; 2+ messages in thread
From: J. Bruce Fields @ 2013-08-12 16:41 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
From: "J. Bruce Fields" <bfields@redhat.com>
RH bz 831455 has a report that repeatedly mounting and unmounting over
lo can hit this warning in the EOF case. I suspect that's just
normal--I'm not sure of the details, but probably idmapd gets woken up
to check for an upcall and then the upcall gets yanked away before
idmapd gets a chance to read it.
So just skip the warning in that case. I also can't see a reason to
reopen.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
utils/idmapd/idmapd.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
index beba9c4..cc4ba9a 100644
--- a/utils/idmapd/idmapd.c
+++ b/utils/idmapd/idmapd.c
@@ -511,10 +511,14 @@ nfsdcb(int UNUSED(fd), short which, void *data)
if (which != EV_READ)
goto out;
- if ((len = read(ic->ic_fd, buf, sizeof(buf))) <= 0) {
+ len = read(ic->ic_fd, buf, sizeof(buf));
+ if (len == 0)
+ /* No upcall to read; not necessarily a problem: */
+ return;
+ if (len < 0) {
xlog_warn("nfsdcb: read(%s) failed: errno %d (%s)",
- ic->ic_path, len?errno:0,
- len?strerror(errno):"End of File");
+ ic->ic_path, errno,
+ strerror(errno));
nfsdreopen_one(ic);
return;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] idmapd: silence pointless EOF warning
2013-08-12 16:41 [PATCH] idmapd: silence pointless EOF warning J. Bruce Fields
@ 2013-08-19 18:26 ` Steve Dickson
0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2013-08-19 18:26 UTC (permalink / raw)
To: J. Bruce Fields; +Cc: linux-nfs
On 12/08/13 12:41, J. Bruce Fields wrote:
> From: "J. Bruce Fields" <bfields@redhat.com>
>
> RH bz 831455 has a report that repeatedly mounting and unmounting over
> lo can hit this warning in the EOF case. I suspect that's just
> normal--I'm not sure of the details, but probably idmapd gets woken up
> to check for an upcall and then the upcall gets yanked away before
> idmapd gets a chance to read it.
>
> So just skip the warning in that case. I also can't see a reason to
> reopen.
>
> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Committed...
steved.
> ---
> utils/idmapd/idmapd.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
> index beba9c4..cc4ba9a 100644
> --- a/utils/idmapd/idmapd.c
> +++ b/utils/idmapd/idmapd.c
> @@ -511,10 +511,14 @@ nfsdcb(int UNUSED(fd), short which, void *data)
> if (which != EV_READ)
> goto out;
>
> - if ((len = read(ic->ic_fd, buf, sizeof(buf))) <= 0) {
> + len = read(ic->ic_fd, buf, sizeof(buf));
> + if (len == 0)
> + /* No upcall to read; not necessarily a problem: */
> + return;
> + if (len < 0) {
> xlog_warn("nfsdcb: read(%s) failed: errno %d (%s)",
> - ic->ic_path, len?errno:0,
> - len?strerror(errno):"End of File");
> + ic->ic_path, errno,
> + strerror(errno));
> nfsdreopen_one(ic);
> return;
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-19 18:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-12 16:41 [PATCH] idmapd: silence pointless EOF warning J. Bruce Fields
2013-08-19 18:26 ` Steve Dickson
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).