[gamin] Re: [RFC][PATCH] inotify 0.10.0



On Wed, 2004-09-29 at 21:15 -0700, Andrew Morton wrote:


> Or is it the case that you expect a single monitor on /etc will return
> "/etc/passwd" if someone modified that file, or "/etc/hosts" if someone
> modified that file?

A monitor on "/etc" will return "hosts" if hosts is modified.  Which I
think is OK--we don't pass the entire path, nor do we want to if we
could do it easily, for numerous reasons ..

> If so, perhaps we should take that feature away and
> require that userspace rescan the directory?

This is one of the issues with dnotify we want to fix.  And to do
generic file notification, it is not just rescanning the directory but
caching file modify timestamps (say, keep all of the stat structures in
memory) and then re-stat'ing everything and comparing.  Ugh.

> Because passing pathnames into and back from the kernel from this manner is
> really not a nice design.

Agreed.

> A halfway point might be to return {cookie-of-/etc,EVENT_MODIFY,"hosts"} to
> a monitor on the /etc directory.

This is what inotify does. ;-)

Everything is relative to the object being watched.

	Robert Love





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]