From: "J. Bruce Fields" <bfields@fieldses.org>
To: steved@redhat.com
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH] idmapd: silence pointless EOF warning
Date: Mon, 12 Aug 2013 12:41:44 -0400 [thread overview]
Message-ID: <20130812164144.GC2395@fieldses.org> (raw)
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
next reply other threads:[~2013-08-12 16:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-12 16:41 J. Bruce Fields [this message]
2013-08-19 18:26 ` [PATCH] idmapd: silence pointless EOF warning Steve Dickson
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=20130812164144.GC2395@fieldses.org \
--to=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=steved@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 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).