From mboxrd@z Thu Jan 1 00:00:00 1970 From: Evgeniy Polyakov Subject: Re: [Question] inotify : process based filtering of events Date: Sat, 20 Dec 2008 13:40:48 +0300 Message-ID: <20081220104048.GB23632@ioremap.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel , linux-fsdevel@vger.kernel.org To: Niraj kumar Return-path: Received: from kandzendo.ru ([195.178.208.66]:36174 "EHLO tservice.net.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751288AbYLTKkt (ORCPT ); Sat, 20 Dec 2008 05:40:49 -0500 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hi. On Sat, Dec 20, 2008 at 12:21:33PM +0530, Niraj kumar (niraj17@gmail.com) wrote: > I am trying to use inotify to monitor filesystem events but > my problem is that I am only interested in changes that > is being done by a particular process and it's children > (could be the same process which used inotify APIs). > > Is it possible to achieve this process based filtering of events > using inotify infrastructure? You can try using inotify nested attributes patch [1] and filter events in userspace based on reported pid/tid. With the fsnotify changes coming it may be possible to have similar functionality there. 1. Inotify nested attributes. http://lkml.org/lkml/2008/11/25/272 2. Example usage and test application. http://www.ioremap.net/node/73 -- Evgeniy Polyakov