Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1746380imm; Wed, 6 Jun 2018 23:06:48 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJj1L6GOUhwN9VpEWICMqUrg1L/3Qbqle5Mw1HtSGAKvFnaKeAZJE/9AqaMmtGdqYe+qOIw X-Received: by 2002:a17:902:125:: with SMTP id 34-v6mr647420plb.42.1528351608590; Wed, 06 Jun 2018 23:06:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528351608; cv=none; d=google.com; s=arc-20160816; b=p9hpgkgNvPdLbx8tNoKMF02RRizhqKoRUSQawnN++LCWDLueYLOWzLPyfvGoxSkEKd GS3xSNLPtIG8CCS2V4miNqdE43bVL+cCYrwvR7s9NiS6YSkhvyTiqRanawh4Zagqzq5T 26MJmFEHowM6nSkl45cYUeilCkHTusJvtfWxfav3CffBP4qGkgDPdCh1iRcm+xNHvL7G qDyAYzyV5u3vr4XCa6PM8+UkdrbvCGctXTNpfF18htl/lHjhmnomncHQVJgtrx8ICBKU 3IU/TnecuN3Is5nFsXxGySahs5UUmXPXPGD9gb2VXqJ39Ydp2XEICfv7wKj/krqNY+sW 8P0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=MvtZ7nBUnCH/F6h6d5ya1aWf9ueSpjnBXjpm0YA/TYk=; b=0b/WCIVon5DuB7gVAlpFxW1RYuG8ClAF9lPNYfd1e6OIa0ufv/6O2SlD/5VvCoyHNX xLkiuYqCEh68gjjKcRGEremDTWNNx8BOzsTHRUbCsZy4oeu+sbYmD/JVYY9ADTMkD+Xp gRcdhDGja9XlxAjPTf7531U8BMFevgGDxiz/N4slgp/RwZSI8HgAWfoYY593UIQVdmD2 Pxz3jMLw+dahPc8+isIsUmVZum487fdYE7HScxuxuF2L87Xh9lzaZD8KH0ILsl0UrPa9 jIUeizD26zxJgstbBLuh2MLshus7mYQ8jQdAdPZrsvJYC3gm+WxELkYgRoooEKuozzOA GLkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oJiAU4U0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3-v6si19862201pgq.387.2018.06.06.23.06.34; Wed, 06 Jun 2018 23:06:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oJiAU4U0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752669AbeFGGGJ (ORCPT + 99 others); Thu, 7 Jun 2018 02:06:09 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:34703 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752553AbeFGGGH (ORCPT ); Thu, 7 Jun 2018 02:06:07 -0400 Received: by mail-yw0-f193.google.com with SMTP id b125-v6so2680274ywe.1; Wed, 06 Jun 2018 23:06:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=MvtZ7nBUnCH/F6h6d5ya1aWf9ueSpjnBXjpm0YA/TYk=; b=oJiAU4U0R2EeGOoaRVcHk2JcMgpgnuYgisnu1GCuwdluDFEeq9PQoK0x1/pV+UxZ+y RbhuGYXrNSXEfVA5w2SKhfIwPVa/FB15zcJM9nkFObaRZnLQPq8EyL2aJc6q7Rc0Agt8 rW6c4CSQbkS2qpdGtxa/AtezRHndpphJdlq0Q5YS9myVDG0/HS6CjZV9/5UWnCvc3PZM Xw+f3pQixN3B3IGFJSANkIIimLAUxx4ZLkaB7Vk1WjAOqBWMusRw/XnlVOWo3evFCEyq 2TOGatHGerdSB8MTQ6zngFGFlgbNQCRUfz4G0Xq3RXpNwwZ0CEtv0gxZuxHfQM66u4ph B51A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=MvtZ7nBUnCH/F6h6d5ya1aWf9ueSpjnBXjpm0YA/TYk=; b=TiFi+H6OkI8qjphxAsCCDKXqO1WttRB4xL+OREcAfbBaV9/WMKJz4uYRGWolOgIpJP LlzJuNbQLNQlgJ+BiOjv6fmA+uuwMG1qBxjUB3HCqMiKFV4sn5X8zlmQ6ztZD/9uEq8b BUl+E/GOBKaJntowYDqtZFqbYRBFNmeR8SHeujduE5UcCofOPYfwfkwc7BxEmKTfBZ4x fwcAKUejy4baDwmFmuTq/h6CVLA5GqJsyLXGOmgfj2Trfzm5jrrMjccsBxgH2/NjrFlg oLaQWMiFwgfK6By246QMf8i8hwptGdZRP0pmljYbobJ8SVkrjk3A/MK72sRLw3UFq5E6 NR8A== X-Gm-Message-State: APt69E0OzK88pXON+b8P0ILm0nUEmeudWq6aDQ/ZZucko1tgiwrb20l3 kHWFQr0HQcc1EvsOyH26xjcYc43PYMknaRYry0Q= X-Received: by 2002:a81:168a:: with SMTP id 132-v6mr263147yww.183.1528351565414; Wed, 06 Jun 2018 23:06:05 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a81:79cf:0:0:0:0:0 with HTTP; Wed, 6 Jun 2018 23:06:04 -0700 (PDT) In-Reply-To: <20180606204215.GD9445@wotan.suse.de> References: <20180508180436.716-1-mfasheh@suse.de> <20180508233840.GM10363@dastard> <20180509064103.GP10363@dastard> <5b2ae799-1595-c262-7b65-41b10c11906d@suse.com> <20180606204215.GD9445@wotan.suse.de> From: Amir Goldstein Date: Thu, 7 Jun 2018 09:06:04 +0300 Message-ID: Subject: Re: [RFC][PATCH 0/76] vfs: 'views' for filesystems with more than one root To: Mark Fasheh Cc: Jeff Mahoney , Dave Chinner , linux-fsdevel , linux-kernel , Linux Btrfs , Miklos Szeredi , David Howells , Jan Kara Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 6, 2018 at 11:42 PM, Mark Fasheh wrote: > Hi Amir, thanks for the comments! > Hi Mark, [...] > > Btw, sorry that the name is confusing. I've never been good at picking them. Didn't say that it was confusing. It might very well be the perfect name... if I only knew what sort of thing we are trying to name... > That said, if you have a minute to check out the first patch or two you'll > see that the patches are basically putting a struct in between the super > block and the inode. > > > One thing I'd like to politely suggest is that anyone now following this > conversation to please read the at least the first patch. It's an easy read > and I feel like the conversation overall would be much more clear if > everyone understood what we're going for. I worry that I didn't do a > particularly good job explaining the actual code changes. > > https://www.spinics.net/lists/linux-fsdevel/msg125492.html > I did look at the patches. They look simple and clean and they solve A problem. All I'm saying is that we should look at the set of problems that we know of before we design an abstraction layer. > > Regarding a layout of the problems, I have a more complete e-mail coming > soon which should describe in detail the issues I've seen with respect to > how the kernel is exporting ino/dev pairs (outside of statx). fs_view alone > is not enough to solve that problem. I'd be happy to CC you on that one if > you'd like. > Sure. [...] >> >> And what is the SUSE way? > > At SUSE, we carry a version of this patch: > > https://marc.info/?l=linux-btrfs&m=130532890824992&w=2 > > Essentially a callback which was rejected for various reasons. > Don't see a patch here. Wrong link? > The fs_view work was intended to replace that patch with an upstream > solution. > > [...] >> >> FYI, the Overlayfs file/inode mapping is about to change with many >> VFS hacks queued for removal, so stay tuned. >> >> [...] > > Actually, would you mind giving me a pointer to this work? I'd be very > interested to see what exactly might be changing. > Mostly, less VFS code is going to be exposed to underlying inode: https://marc.info/?l=linux-fsdevel&m=152760014530531&w=2 [...] >> I have an interest of solving another problem. >> In VFS operations where only inode is available, I would like to be able to >> report fsnotify events (e.g. fsnotify_move()) only in directories under a >> certain subtree root. That could be achieved either by bind mount the subtree >> root and passing vfsmount into vfs_rename() or by defining an fs_view on the >> subtree and mounting that fs_view. > > I'm not sure whether fs_view works for this. Taking a quick look at > fsnotify, the state is already on the inode? If there's a globabl fsnotify > state that needs to be per subtree than yes we could move that to the > fs_view and you'd simply deref it from the inode struct. > That was my thinking. I have patches to attach an fsnotify mark to super block. If fs_view could have a root that is different than super block's root and if file system can guaranty that objects cannot be moved outside of fs_view root, then fsnotify mark could be attached to fs_view. Thanks, Amir.