Date: Fri, 8 Jun 2007 10:58:01 +0200 From: Flavio Castelli <micron@bglug.it> To: freebsd-fs@freebsd.org Subject: Re: file system notifications Message-ID: <200706081058.02229.micron@bglug.it> In-Reply-To: <4661F340.6080009@net.utcluj.ro> References: <200706011557.13769.micron@bglug.it> <4661F340.6080009@net.utcluj.ro>
next in thread | previous in thread | raw e-mail | index | archive | help
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" ~
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706081058.02229.micron>
