lkml.org 
[lkml]   [2001]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Kernel Compile in tmpfs crumples in 2.4.12 w/epoll patch


On Mon, 22 Oct 2001, Larry McVoy wrote:

> for (;;) {
> lstat(dir);
> while (e = readdir(..)) save(e->d_name);
> lstat(dir)
> if (dir size && dir mtime have NOT changed) break;
> cleanup the array and go start over
> }
> sort entries
> return sorted list
>
> The basic idea being that we first of all narrow the race window and
> second of all detect the race in all cases where the mods to the dir
> result in either a changed mtime or a changed size. So yes, that leaves
> us open to cases where the size didn't change but the contents did but
> I'll be ding danged if I can see a way around that.

There's none. Notice that if you want a coherent view of directory,
you need something like the variant above anyway - even with FFS. New
entry could've been added into slack in one of the entries you've
already seen.

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

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