From mboxrd@z Thu Jan 1 00:00:00 1970 From: DENIEL Philippe Subject: Re: [8/8] Fix fsnotify short comings (single fd with recursive notifications). Date: Mon, 08 Apr 2013 15:59:49 +0200 Message-ID: <5162CD55.6040205@cea.fr> References: <516299A5.8030109@panasas.com> <51629FDB.5090708@panasas.com> Reply-To: philippe.deniel@cea.fr Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Steven Whitehouse , Steve Dickson , Jeff Layton , lsf-pc@lists.linux-foundation.org, linux-fsdevel , Ganesha NFS List , Frank S Filz , "J. Bruce Fields" , "Lieb, Jim" , Venkateswararao Jujjuri To: Boaz Harrosh Return-path: Received: from oxalide-out.extra.cea.fr ([132.168.224.8]:41404 "EHLO oxalide-out.extra.cea.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935972Ab3DHOP3 (ORCPT ); Mon, 8 Apr 2013 10:15:29 -0400 Received: from pisaure.intra.cea.fr (pisaure.intra.cea.fr [132.166.88.21]) by oxalide.extra.cea.fr (8.14.2/8.14.2/CEAnet-Internet-out-2.3) with ESMTP id r38DxoOS020954 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 8 Apr 2013 15:59:50 +0200 Received: from muguet1.intra.cea.fr (muguet1.intra.cea.fr [132.166.192.6]) by pisaure.intra.cea.fr (8.14.4/8.14.4) with ESMTP id r38DxnLi014884 for ; Mon, 8 Apr 2013 15:59:50 +0200 (envelope-from philippe.deniel@cea.fr) Received: from zia.cdc.esteban.ctsi (out.dam.intra.cea.fr [132.165.76.10]) by muguet1.intra.cea.fr (8.13.8/8.13.8/CEAnet-Intranet-out-1.2) with SMTP id r38DxncO012583 for ; Mon, 8 Apr 2013 15:59:49 +0200 In-Reply-To: <51629FDB.5090708@panasas.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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. regards Philippe