file system notifications
Flavio Castelli
micron at bglug.it
Fri Jun 8 08:58:13 UTC 2007
On Sunday 03 June 2007 00:46, you wrote:
> I am curious. Have you tried fam? As far as I know, fam was created so
> that developers won't have to bother about the mechanism they should use
> to get file notifications.
Yes I looked at fam and gamin (a project that extends fam) but I didn't choose
them.
Fam has lot of problems (first of all in some situations it can take lots of
cpu cicles) and its development seems abandoned.
Both fam and gamin use native file system notification structures when
available and use polling as a fall-back mechanism. Since kqueue has some
limitations (as exposed in my first post), it's really hard to develop a good
notification mechanism without falling back to polling or using a
mixed-approach.
Just an example.
Suppose you have told kqueue to watch dir /tmp/foo. If you
create/delete/rename/update a file/dir inside /tmp/foo, kqueue will tell you
an event has occurred inside the watched directory. Kqueue's limitation is
the lack of informations associated to the event since it _doesn't_ tell what
happened. So a program has to walk across the watched dir (where the event
took place) and find the changes that happened.
Now, what I really like to know is if there is another system notification
mechanism that works like inotify or fsevents.
I would also use kqueue if there's a way to make it generate more
informations.
Cheers
Flavio
--
|§ micron<- ICQ #118796665
|§ GPG Key:
|§ ~ Keyserver: pgp.mit.edu
|§ ~ KeyID: 6D632BED
~ "Progress is merely a realisation of utopias" ~
More information about the freebsd-fs
mailing list