getdents64 problem in 2.6.23

Jörn Engel joern at logfs.org
Sat Oct 27 19:18:12 EDT 2007


On Fri, 26 October 2007 19:17:40 -0400, David Woodhouse wrote:
> 
> We probably need to implement a release() operation in the
> jffs2_dir_operations (top of dir.c), which will remove the fake
> 'deletion' dirents if !atomic_read(&inode->i_count). Or something like
> that.

I hate to spoil the fun, but this can cause problems with nfs.

It is legal for nfs to call telldir, close the directory, wait for half
a year, then open the directory, call seekdir and expect sane results.
Not pretty at all for filesystem implementors.

So either these deletion dirents need to stay around or you have to
convert the i_pos "cookie" to a hash of the filename or so or at least
explicitly document that you have broken nfs under some circumstances.

Of course any other program could do the telldir/seekdir stunt as well.
Nfs just appears to be the only one doing this madness in practice.

Jörn

-- 
Doubt is not a pleasant condition, but certainty is an absurd one.
-- Voltaire



More information about the linux-mtd mailing list