Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E3EBC433B4 for ; Fri, 9 Apr 2021 14:46:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 59FEA610D0 for ; Fri, 9 Apr 2021 14:46:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233527AbhDIOq0 (ORCPT ); Fri, 9 Apr 2021 10:46:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232884AbhDIOq0 (ORCPT ); Fri, 9 Apr 2021 10:46:26 -0400 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D590C061760 for ; Fri, 9 Apr 2021 07:46:13 -0700 (PDT) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94 #2 (Red Hat Linux)) id 1lUsOe-0042Ik-W4; Fri, 09 Apr 2021 14:46:09 +0000 Date: Fri, 9 Apr 2021 14:46:08 +0000 From: Al Viro To: Christian Brauner Cc: Amir Goldstein , Jan Kara , linux-fsdevel , Miklos Szeredi , "J. Bruce Fields" Subject: Re: fsnotify path hooks Message-ID: References: <20210401102947.GA29690@quack2.suse.cz> <20210408125258.GB3271@quack2.suse.cz> <20210409100811.GA20833@quack2.suse.cz> <20210409143901.pksgu6apbll7q3lt@wittgenstein> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210409143901.pksgu6apbll7q3lt@wittgenstein> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Fri, Apr 09, 2021 at 04:39:01PM +0200, Christian Brauner wrote: > On Fri, Apr 09, 2021 at 02:30:13PM +0000, Al Viro wrote: > > On Fri, Apr 09, 2021 at 04:22:58PM +0300, Amir Goldstein wrote: > > > > > But we are actually going in cycles around the solution that we all want, > > > but fear of rejection. It's time to try and solicit direct feedback from Al. > > > > > > Al, > > > > > > would you be ok with passing mnt arg to vfs_create() and friends, > > > so that we can pass that to fsnotify_create() (and friends) in order to > > > be able to report FAN_CREATE events to FAN_MARK_MOUNT listeners? > > > > I would very much prefer to avoid going that way. > > Fwif and if I understand this correctly then this would mostly matter > for stacking filesystems or filesystems that already have access to the > relevant struct vfsmount they need to talk about anyway. It's not about > passing struct vfsmount into inode methods themselves which would be a > bad idea. Meaning Amir's change would not require or cause vfsmounts > to be made accessible where they arent't already. AFAICS, you are getting caught on mount marks semantics (or lack thereof). It's _not_ "event happened to something visible here"; it's "event had been requested by way that explicitly refers to that mount". And that, IMO, pushes that crap from the places where the work is done to the places where it had been requested.