From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH] VFS/inotify: send netlink messages when an inotify watch has been set or removed. Date: Sat, 7 Jan 2012 14:38:02 +0000 Message-ID: <20120107143802.GM23916@ZenIV.linux.org.uk> References: <4F084A4C.6080207@bononline.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, rlove@rlove.org, eparis@parisplace.org To: Stef Bon Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:38768 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750934Ab2AGOiG (ORCPT ); Sat, 7 Jan 2012 09:38:06 -0500 Content-Disposition: inline In-Reply-To: <4F084A4C.6080207@bononline.nl> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, Jan 07, 2012 at 02:36:12PM +0100, Stef Bon wrote: > from: Stef Bon > > I would like to apply a patch to the kernel to enable the sending of a > netlink message when setting or removing an inotify watch. My goal is > to make FUSE filesystems notify aware. > > Since inotify works in the kernel space, and FUSE filesystems are in > userspace, FUSE fs's do not "know" when a watch has been set or > removed. > > I think it's a good thing the fs "knows" about a watch, since it can > then set a backend specific notify watch on the backend, and report > anything back to the kernel when something changes. > > The new netlink.c file is almost a copy of the netlink.c file in > fs/quota. > > I've got a testprogram which receives messages in the group > GENERIC/VFS_INOTIFY. > If you want to test please email me. It just gives the information a > watch has been set (by who, and where, which mask) and when removed > (pid/fd/wd). And what, pray tell, is the recepient to do with the contents of that packet? Pardon the bluntness, but how the hell is your FUSE fs supposed to tell that pathname has anything to do with it, nevermind telling which object would it relate to? Especially when it has no way to tell at which locations the damn thing happens to be mounted from the caller POV. NAK.