Re: Kernel Compile in tmpfs crumples in 2.4.12 w/epoll patch

Alexander Viro (viro@math.psu.edu)
Mon, 22 Oct 2001 06:01:32 -0400 (EDT)


On 22 Oct 2001, Christoph Rohland wrote:

> Hi Larry,
>
> On Sun, 21 Oct 2001, Larry McVoy wrote:
> > One of the engineers here has also seen this. The root cause is
> > that readdir() is returning a file multiple times. We've seen it on
> > tmpfs. We also have seen in in NFS and had a workaround, the
> > workaround depended that the file would be returned twice right next
> > to each other and that's not the case in tmpfs. wscott@bitmover.com

That's not guaranteed for NFS, BTW.

> > can provide you with the details of his machine config, here's the
> > mail he sent a while back about it:
>
> tmpfs does not know anything about directory handling. It uses
> generic_read_dir and dcache_readdir. So this must be a bug in the vfs
> layer. Al, what do you say?

If you are changing directory between the calls of getdents(2) - you have
no warranty that offsets will stay stable. It's not just Linux.

Frankly, I don't see what could be done, short of doing qsort() by inumber
or something equivalent...

-
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/