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

Wayne Scott (wscott@bitmover.com)
Mon, 22 Oct 2001 08:29:35 -0500 (EST)


From: Alexander Viro <viro@math.psu.edu>
> > 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...

So if I am adding files while reading the directory the directory
structure gets rewritten and I might return files more than once?
What happens if files are being deleted? Can files be skipped?!?

Any reason we have never seen this on ext2 on other filesystems on 10+
versions of UNIX? BitKeeper is pretty paranoid and includes a lot of
sanity checks.

Does this only happen when the subdirectory I am reading changes, or
on tmpfs will changing any directory cause this?

I am looking at coding a workaround, but I need to know how bad the
problem can be.

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