Re: explicit dcache <-> user-space cache coherency, sys_mark_dir_clean(), O_CLEAN

Linus Torvalds
2004-02-21T01:05:50Z

On Sat, 21 Feb 2004, Jamie Lokier wrote:
>
> Eh? The flag and notification operations are set and tested
> under the inode semaphore, when fcntl() is called.

Doesn't matter. Because you will drop the inode semaphore before you
actually create a new file. So you'll alway shave a window open for a
race.

That's what Ingo's O_CLEAN thing did. An di fyou do Ingo's O_CLEAN, then
there's no point to notifiers in the first place - Ingo's algorithm works
regardless of them (it had other problems, but that's another issue and
just requires a bit of extending on the basic concept).

So why do you care about dnotify? It doesn't help at all once you have
O_CLEAN (or equivalent).

Linus