[lkml]   [2003]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [Ext2-devel] Re: ext3 htree brelse problems look to be fixed!
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

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
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:33    [W:0.054 / U:0.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site