From: "Theodore Ts'o" <tytso@mit.edu>
To: Christopher Li <chrisl@vmware.com>
Cc: "'Daniel Phillips'" <phillips@arcor.de>,
"James H. Cloos Jr." <cloos@jhcloos.com>,
ext2-devel@lists.sourceforge.net, ext3-users@redhat.com,
linux-kernel@vger.kernel.org
Subject: Re: [Ext2-devel] Re: ext3 htree brelse problems look to be fixed!
Date: Wed, 5 Mar 2003 01:54:20 -0500 [thread overview]
Message-ID: <20030305065419.GA22296@think.thunk.org> (raw)
In-Reply-To: <3C77B405ABE6D611A93A00065B3FFBBA36A531@PA-EXCH2>
On Tue, Mar 04, 2003 at 06:36:54PM -0800, Christopher Li wrote:
> I post a patch for comment on ext2-devel for the
> NFS cookie bug. Did not get any feedback yet.
> As Ted suggested, it set the cookie to -1 on EOF,
> even though it is not seek able to there.
The patch was almost good enough. The problem with your simple
version was that on the subsequent call to ext3_dx_readdir, the -1 got
translated to a hash value of fffffffe, and if you were unlucky enough
to have a file whose hash was 0xfffffffe, you'd still end up looping
forever.
See the patch which I just sent to ext2-devel and LKML, which I think
solves both this problem and the conversion-to-htree-while-doing-NFS-readdir
problem. What I did was to treated f_pos==-1 as an explicit EOF cookie,
instead of letting it get translated into large hash value. I also explicitly
returned a next_hash value of ~0 when there was no more leaf pages, which
then got immediately translated into a f_pos value of -1. This saves an
extra call to ext3_htree_fill_tree(), a minor optimization.
- Ted
prev parent reply other threads:[~2003-03-05 6:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-05 2:36 [Ext2-devel] Re: ext3 htree brelse problems look to be fixed! Christopher Li
2003-03-05 6:54 ` Theodore Ts'o [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=20030305065419.GA22296@think.thunk.org \
--to=tytso@mit.edu \
--cc=chrisl@vmware.com \
--cc=cloos@jhcloos.com \
--cc=ext2-devel@lists.sourceforge.net \
--cc=ext3-users@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=phillips@arcor.de \
/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.