All of lore.kernel.org
 help / color / mirror / Atom feed
* stdio and nfs-utils
@ 2007-07-25 22:37 J. Bruce Fields
  2007-07-26  0:07 ` J. Bruce Fields
  0 siblings, 1 reply; 16+ messages in thread
From: J. Bruce Fields @ 2007-07-25 22:37 UTC (permalink / raw)
  To: Neil Brown; +Cc: nfs

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2007-07-27 14:40 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-25 22:37 stdio and nfs-utils J. Bruce Fields
2007-07-26  0:07 ` 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

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.