public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Doug Nazar" <nazard@dragoninc.ca>
To: "'J. Bruce Fields'" <bfields@fieldses.org>
Cc: "'David Woodhouse'" <David.Woodhouse@intel.com>,
	"'Al Viro'" <viro@zeniv.linux.org.uk>,
	<linux-kernel@vger.kernel.org>
Subject: RE: 2.6.28-rc3 truncates nfsd results
Date: Thu, 6 Nov 2008 00:21:26 -0500	[thread overview]
Message-ID: <000001c93fcf$8431dbd0$8c959370$@ca> (raw)
In-Reply-To: <20081105214655.GK1455@fieldses.org>



> From: J. Bruce Fields [mailto:bfields@fieldses.org]
> Anyone know where to find the best documentation of the vfs_readdir
> semantics?  I obviously didn't understand it as well as I should.

Hmm.... I seem to remember a conversation about readdir from Al awhile back. Looking....

Here it is:
http://kerneltrap.org/mailarchive/linux-fsdevel/2008/8/12/2903744

Maybe that will help. 

> > The computers showing the issue are not using dir_index. This causes
> > ext3 to read a block at a time, which then means we can end up with
> > buf.full==0 but not finished reading the directory. Before 8d7c4203,
> > we'd always get called again because we never set nfserr_eof which
> > papered over it.
> 
> OK, so if I'm understanding you correctly: there was also (as of
> c002a6c797 "Optimise NFS readdir hack slightly"?) a performance
> regression which could force the client to do more round trips to the
> server to read the whole directory?

>From what I could see yes. On an empty directory there would actually be two readdir 
requests both with eof not set. On a full directory when the sending buffer was full,
func() would return NFS4ERR_TOOSMALL and nfsd_buffered_read would return success. After 
c002a6c797 "Optimise NFS readdir hack slightly", I ended up with buf.used=912, 
buf.full=0 & offset=4096 so we would finish the while loop with a small output buffer, 
eof not set. The client then makes another request and continues so long as forward 
progress was made. After 8d7c4203c6 "nfsd: fix failure to set eof in readdir in some situations"
it would force eof for any small buffer causing the client to terminate the request.

Commit look fine and sure add my signed-off-by. Not sure if we got *all* the bugs but the way 
I see it, every bug is a chance to learn <g>



      parent reply	other threads:[~2008-11-06  5:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-04 18:27 2.6.28-rc3 truncates nfsd results Doug Nazar
2008-11-04 18:43 ` Jeff Garzik
2008-11-04 19:03   ` David Woodhouse
2008-11-04 19:32     ` Doug Nazar
2008-11-04 20:08       ` David Woodhouse
2008-11-09 19:09   ` J. Bruce Fields
2008-11-04 19:36 ` J. Bruce Fields
2008-11-04 22:30 ` J. Bruce Fields
2008-11-05 11:16   ` Doug Nazar
2008-11-05 21:46     ` J. Bruce Fields
2008-11-05 23:07       ` J. Bruce Fields
2008-11-06  5:21       ` Doug Nazar [this message]

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='000001c93fcf$8431dbd0$8c959370$@ca' \
    --to=nazard@dragoninc.ca \
    --cc=David.Woodhouse@intel.com \
    --cc=bfields@fieldses.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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