Re: [Ext2-devel] Re: [NFS] htree+NFS (NFS client bug?)

Trond Myklebust (trond.myklebust@fys.uio.no)
Thu, 28 Nov 2002 18:57:45 +0100


>>>>> " " == Stephen C Tweedie <sct@redhat.com> writes:

> Right. But marking the fact can be done in the inode. We do
> that for regular files, after all --- we have an i_size field
> which marks the value of f_pos which represents EOF. And
> _that_ is what I'm suggesting for the NFS case --- record in
> the inode the cookie which represents EOF, so that in future
> reads from cache, we still know when we've got to the end of
> the stream.

That wouldn't really help much here, since that scheme also has a
uniqueness assumption on the cookie. I agree that it would cause a
more graceful failure, since we'd end up truncating the readdir rather
than endlessly looping, but as far as the user is concerned, it's
still wrong behaviour.

The real solution here would be to augment the cookie information in
the struct file with something like a filename in order to define
where we are in the readdir stream.
That doesn't work too well with telldir/seekdir though, and glibc
(grr....) relies heavily on using those in order in their 'heuristic'
that corrects for dirent being larger than the kernel dirent.

Cheers,
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/