From owner-freebsd-fs@FreeBSD.ORG Fri Jun 8 08:58:13 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 169D216A41F for ; Fri, 8 Jun 2007 08:58:13 +0000 (UTC) (envelope-from micron@bglug.it) Received: from jack.tiscali.it (jack.tiscali.it [213.205.33.53]) by mx1.freebsd.org (Postfix) with ESMTP id 687E813C44B for ; Fri, 8 Jun 2007 08:58:12 +0000 (UTC) (envelope-from micron@bglug.it) Received: from [10.8.0.10] (84.220.184.158) by jack.tiscali.it (7.2.079) id 465A9B13001EE1A8 for freebsd-fs@freebsd.org; Fri, 8 Jun 2007 10:58:09 +0200 From: Flavio Castelli To: freebsd-fs@freebsd.org Date: Fri, 8 Jun 2007 10:58:01 +0200 User-Agent: KMail/1.9.5 References: <200706011557.13769.micron@bglug.it> <4661F340.6080009@net.utcluj.ro> In-Reply-To: <4661F340.6080009@net.utcluj.ro> X-Face: $Txq`+~>k4|^/-x\@oJeZW!JU; 1g78H("lLgtOyrD\&:=?iso-8859-1?q?uz=3AGv=7E=0A=09=5DHV/7cx=3DTaNUwE?=>(tllad(pN*f+LRB(:{k~/[R00SWX@=?iso-8859-1?q?=5DywcKa=0A=094=7DX?=(}gp/P"nfEAUQL(:G1a]n\'bQUC MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200706081058.02229.micron@bglug.it> X-Length: 2641 X-UID: 2114 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: Re: file system notifications X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2007 08:58:13 -0000 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" ~