Skip site navigation (1)Skip section navigation (2)
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 cho=
ose=20
them.

=46am has lot of problems (first of all in some situations it can take lots=
 of=20
cpu cicles) and its development seems abandoned.
Both fam and gamin use native file system notification structures when=20
available and use polling as a fall-back mechanism. Since kqueue has some=20
limitations (as exposed in my first post), it's really hard to develop a go=
od=20
notification mechanism without falling back to polling or using a=20
mixed-approach.

Just an example.
Suppose you have told kqueue to watch dir /tmp/foo. If you=20
create/delete/rename/update a file/dir inside /tmp/foo, kqueue will tell yo=
u=20
an event has occurred inside the watched directory. Kqueue's limitation is=
=20
the lack of informations associated to the event since it _doesn't_ tell wh=
at=20
happened. So a program has to walk across the watched dir (where the event=
=20
took place) and find the changes that happened.

Now, what I really like to know is if there is another system notification=
=20
mechanism that works like inotify or fsevents.
I would also use kqueue if there's a way to make it generate more=20
informations.

Cheers
	Flavio
=2D-=20
|=A7 micron<- ICQ #118796665
|=A7 GPG Key:
|=A7  ~ Keyserver: pgp.mit.edu
|=A7  ~ 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>