From: "J. Bruce Fields" <bfields@fieldses.org>
To: Neil Brown <neilb@suse.de>
Cc: nfs@lists.sourceforge.net
Subject: stdio and nfs-utils
Date: Wed, 25 Jul 2007 18:37:23 -0400 [thread overview]
Message-ID: <20070725223723.GH7943@fieldses.org> (raw)
I ran into some problem yesterday where ls on a directory containing
several unexported mountpoints was hanging. Watching writes to the
/proc/net/rpc/nfsd.export/channel file, what I saw was:
write("gss/krb5i /path/a expiry\n") -> -ENOENT
write("gss/krb5i /path/a expiry\ngss/krb5i /path/b\n" -> -ENOENT
write("gss/krb5i /path/a expiry\ngss/krb5i /path/b\ngss/krb5i/path/b\n) ->ENOENT
etc. You get the idea. The cache code that handles the write throws
away all but the first line, so the extra lines are ignored. The kernel
keeps doing upcalls to ask about /path/b, but never sees the results
because mountd keeps passing down the /path/a downcall again as the
first line each time.
I don't see how nfs-utils itself could be producing multiple lines in
the upcall handler, so I assume what's happening is that the stdio code
is taking the error returns as a sign that it should leave the data in
its buffer and just try again next time another fwrite adds more. Does
that make sense? I don't really understand how stdio is supposed to
handle errors.
The -ENOENTs are spurious in this case, actually; I'll submit a patch
to eliminate them. But could we also just ditch the use of stdio in all
the nfs-utils cache code? The current problem aside it seems likely to
complicate any error handling (which the current nfs-utils code doesn't
even attempt).
--b.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next reply other threads:[~2007-07-25 22:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-25 22:37 J. Bruce Fields [this message]
2007-07-26 0:07 ` stdio and nfs-utils J. Bruce Fields
2007-07-26 2:59 ` Neil Brown
2007-07-26 3:17 ` J. Bruce Fields
2007-07-26 4:10 ` Neil Brown
2007-07-26 20:30 ` [PATCH] Use __fpurge to ensure single-line writes to cache files J. Bruce Fields
2007-07-26 20:31 ` [PATCH] knfsd: eliminate unnecessary -ENOENT returns on export downcalls J. Bruce Fields
2007-07-26 18:43 ` Exportfs not showing exported file systems (was RE: stdio and nfs-utils) Muntz, Daniel
2007-07-26 19:36 ` J. Bruce Fields
2007-07-26 19:48 ` Jeff Layton
2007-07-26 20:04 ` J. Bruce Fields
2007-07-26 20:42 ` Muntz, Daniel
2007-07-26 21:12 ` Jeff Layton
2007-07-26 21:16 ` J. Bruce Fields
2007-07-26 21:40 ` Muntz, Daniel
2007-07-27 14:40 ` 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=20070725223723.GH7943@fieldses.org \
--to=bfields@fieldses.org \
--cc=neilb@suse.de \
--cc=nfs@lists.sourceforge.net \
/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.