Ted,You can still keep per-directory caches that you simply invalidate on each dnotify,
> Actually, not necessarily. What if Samba gets notifications of all
> filename renames and creates in the directory, so that after the
> initial directory scan, it can keep track of what filenames are
> present in the directory? It can then "prove the negative", as you
> put it, without having to continuously do directory scans.
Currently dnotify doesn't give you the filename that is being
added/deleted/renamed. It just tells you that something has happened,
but not enough to actually maintain a name cache in user space.