From mboxrd@z Thu Jan 1 00:00:00 1970 From: Niraj kumar Subject: Re: [PATCH 1/5] fsnotify/vfsmount: add fsnotify fields to struct vfsmount Date: Tue, 15 Dec 2009 16:42:20 +0530 Message-ID: References: <20091203055315.21918.83562.stgit@paris.rdu.redhat.com> <20091204153925.GA17062@infradead.org> <200912101731.43050.agruen@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Christoph Hellwig , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk To: Andreas Gruenbacher , Eric Paris Return-path: Received: from mail-pw0-f42.google.com ([209.85.160.42]:47193 "EHLO mail-pw0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759700AbZLOLMV convert rfc822-to-8bit (ORCPT ); Tue, 15 Dec 2009 06:12:21 -0500 In-Reply-To: <200912101731.43050.agruen@suse.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Dec 10, 2009 at 10:01 PM, Andreas Gruenbacher = wrote: > On Friday 04 December 2009 16:39:25 Christoph Hellwig wrote: >> What's the rationale for adding them? > > The idea is to provide a mechanism to watch for "all events", but in = a > namespace aware way: for that, a process registers interest in all mo= unt > points it can reach. =A0With the previous hack, a global "I want it a= ll" flag, > per-namespace listeners were not possible. > > Root can use bind mounts onto themselves (e.g., mount --bind /foo/bar > /foo/bar) to watch arbitrary directories with the per-mount-point mec= hanism. > Mount as user will open up additional use cases. > > It would be nice to be able to register interest in all events below = a > directory which is not a mount point, too. =A0The problem with that i= s that the > number of cached inodes below a given directory could be huge -- and = we would > have to visit them all atomically in order to "mark" them, which is n= ot > feasible. =A0The per-mount-point mechanism will eventually give us *a= lmost* the > same, and so I believe it's good enough. > As another dimension of the same problem, it would be nice to register interest in events generated by only a particular set of proce= sses. As a special case of this, can I register only for events generated by myself and all my child processes. Is it already covered in some way= ? There are situations where this could be very useful. One such case cou= ld be somebody wanting to audit any random application. Collecting data for t= he whole system and then filtering might be possible, but maynot be very efficie= nt. It might be good to add this while we are at it. Let me know if I am missing something. -Niraj -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html