From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J. Bruce Fields" Subject: Re: [8/8] Fix fsnotify short comings (single fd with recursive notifications). Date: Mon, 8 Apr 2013 11:36:18 -0400 Message-ID: <20130408153618.GB4442@pad.fieldses.org> References: <516299A5.8030109@panasas.com> <51629FDB.5090708@panasas.com> <5162CD55.6040205@cea.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Boaz Harrosh , Steven Whitehouse , Steve Dickson , Jeff Layton , lsf-pc@lists.linux-foundation.org, linux-fsdevel , Ganesha NFS List , Frank S Filz , "Lieb, Jim" , Venkateswararao Jujjuri To: DENIEL Philippe Return-path: Received: from mx1.redhat.com ([209.132.183.28]:38886 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965075Ab3DHPie (ORCPT ); Mon, 8 Apr 2013 11:38:34 -0400 Content-Disposition: inline In-Reply-To: <5162CD55.6040205@cea.fr> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Apr 08, 2013 at 03:59:49PM +0200, DENIEL Philippe wrote: > On 04/08/13 12:45, Boaz Harrosh wrote: > >From: DENIEL Philippe > > > >DENIEL Has reported that watching directories through the new fsnotify API, > >might miss some events like deletes and that a directory watch is not recursive, which > >means that we need to open two fd(s) for each directory in the cache. (Which halves our > >fd cache size). > > > >Again from the top of my head, and I know nothing of this subject. > > > >DENIEL please add any information here, so we can talk about it at LSF. > > > What I have seen was this: > - if dnotify() is used, it gets every events. If used on a > directory, it will get every creation and deletion. But it is not > recursive, so we need to use dnotify on every inode we manage. > - if fanotify is used, it is recursive and by using it on the > root of a filesystem, then you have events from the whole underlying > tree. The trouble is that deletion seem not to be caught. > > I do have tests written in C for that. What are you actually using notifications for? If you had adequate leases/delegations, for example, would you still need them? --b.