Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp463066pxa; Tue, 11 Aug 2020 07:23:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjsrfb9ZnWlo0FW2l0/0yXmEIwHKzlBItt6rW5cVl9B5Kqh/tLSipl1gx3PO2rsJ/fssJm X-Received: by 2002:aa7:c0d3:: with SMTP id j19mr25535997edp.157.1597155806219; Tue, 11 Aug 2020 07:23:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597155806; cv=none; d=google.com; s=arc-20160816; b=kTbGet4GWhZwaz6N+E5vrlCVuseyDUo3R6L0Afsmgw7nWzhNxj0OKxYmRw/Gttpk7R thJ2hQqVgzhmKP/Lmn/IE7H0mNhLntbGXY/lohUmdE5N84/FJldFAsu4/ViG3SxQGzI0 yw6FK4+PwE6Z0CyNpYy70trbC7Nyoukv3e9DiO2gLR59z4H7n+eelgQ/GdpNtwUKZrXU aUUax4aOGCEoXrf/v/CaooIRPwoVAqZTtnugVu3ktk6Guarcqu/6b/MmE74rpBPiwVBF 7r1OsQ9xlJoA7uKtOlFjPjmsEP56lu9QNdg9OGzsEVdz6Rgc6MWQUjZtapP6lLVOWmQs Jg1g== 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 :in-reply-to:references:mime-version:dkim-signature; bh=gzcmWAX8jCtD02rUKXqb4jDkg1pG/t/2SdCoCWri0i0=; b=s/o+JgbvwIwZ9skWYwPN/X2rmYddj9YXkKijvo5ih94pLI/2RKYuLl0KlRHEyOXMyN IugCj6R66E1wOvHiFDC7OTDWjbVl/J7vhGSGqIgKGJ/aDs+tFQCG9pp9E17WlMFjn4L0 knxPhYE8CguKH2+neubFQ0FBtOGYBEX0gnjlgU2BzTdjqgxKACuPdGaDztxMdIUlSWw0 /8XpLuUY6bo9/mHHSB3Me+QMoR+A/Kp2/UAT4c+KgxOBEcNFnc5wN13QHz37PFBh5Vpv PtWlURCVD4mJHdUEKBNAutUtzZtwxSxBLRHx4ziHIXw9Po+hYR/EZvWGEuO/9TP0A+t7 7USQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=RHsbOPLK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id zg2si12985326ejb.183.2020.08.11.07.23.02; Tue, 11 Aug 2020 07:23:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=RHsbOPLK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728737AbgHKOWc (ORCPT + 99 others); Tue, 11 Aug 2020 10:22:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728727AbgHKOWb (ORCPT ); Tue, 11 Aug 2020 10:22:31 -0400 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E866C061787 for ; Tue, 11 Aug 2020 07:22:31 -0700 (PDT) Received: by mail-ej1-x643.google.com with SMTP id m22so13285804eje.10 for ; Tue, 11 Aug 2020 07:22:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gzcmWAX8jCtD02rUKXqb4jDkg1pG/t/2SdCoCWri0i0=; b=RHsbOPLKErKudyyVkI0V4WBg3g/e/AwSdYYNz7ERyMqdsGtU/TNdLpbNe8Rwq92uu1 YqiWSVykozP45Monynqi4JD8jg46N/3ugkI18MzqXluT4ZhEHaI7kEqBACZl+teReLAw hAoNbEl8kOadhLCHGzz7ENI7iNyBfYiok5hH8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gzcmWAX8jCtD02rUKXqb4jDkg1pG/t/2SdCoCWri0i0=; b=pmnXUKKC0/HwzTGugYFjMDVk4auscKSp3P/lAnOLeSRU/62qZ+XQsg+qDt5jM775JY qBrHIKu06PPQdLOcyr5x9XZrb8/l5Vdnj1YSJ6RmpDw303ydGuJvwx7QzJUAJpZt88mo YhPI5aZRcCjOURONJaZIPN+iEDHkelIeu61HAdgClw2aR9pWTL1YA16cFLO4mHiSydeA ZrspO1RrEeMq9AbXC030QTdWuSa0L3HZNwhT4eckJ9yB2cxVfw014ntzPe1I86bm+8yD 1T1xI6hChZoNAEoqLQ0u+yYEsM4+v6NX518egJHFEmGxfX8GHhPJaNm+0Dj16L/01Ozj pZyg== X-Gm-Message-State: AOAM532WDlCXEeB66irLFeqdeURWwiYxtg+DSzgDcq1Or+FzijdumTYF fFrfqn0/Lr/QbkbnHEElX3EzSKxJNv4JiE8oVAPL5w== X-Received: by 2002:a17:906:4c46:: with SMTP id d6mr28057620ejw.14.1597155750007; Tue, 11 Aug 2020 07:22:30 -0700 (PDT) MIME-Version: 1.0 References: <1842689.1596468469@warthog.procyon.org.uk> <1845353.1596469795@warthog.procyon.org.uk> <20200811135419.GA1263716@miu.piliscsaba.redhat.com> <20200811140833.GH1236603@ZenIV.linux.org.uk> In-Reply-To: <20200811140833.GH1236603@ZenIV.linux.org.uk> From: Miklos Szeredi Date: Tue, 11 Aug 2020 16:22:19 +0200 Message-ID: Subject: Re: file metadata via fs API (was: [GIT PULL] Filesystem Information) To: Al Viro Cc: linux-fsdevel@vger.kernel.org, David Howells , Linus Torvalds , Karel Zak , Jeff Layton , Miklos Szeredi , Nicolas Dichtel , Christian Brauner , Lennart Poettering , Linux API , Ian Kent , LSM , linux-kernel@vger.kernel.org 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 Tue, Aug 11, 2020 at 4:08 PM Al Viro wrote: > > On Tue, Aug 11, 2020 at 03:54:19PM +0200, Miklos Szeredi wrote: > > On Wed, Aug 05, 2020 at 10:24:23AM +0200, Miklos Szeredi wrote: > > > On Tue, Aug 4, 2020 at 4:36 PM Miklos Szeredi wrote: > > > > > > > I think we already lost that with the xattr API, that should have been > > > > done in a way that fits this philosophy. But given that we have "/" > > > > as the only special purpose char in filenames, and even repetitions > > > > are allowed, it's hard to think of a good way to do that. Pity. > > > > > > One way this could be solved is to allow opting into an alternative > > > path resolution mode. > > > > > > E.g. > > > openat(AT_FDCWD, "foo/bar//mnt/info", O_RDONLY | O_ALT); > > > > Proof of concept patch and test program below. > > > > Opted for triple slash in the hope that just maybe we could add a global > > /proc/sys/fs/resolve_alt knob to optionally turn on alternative (non-POSIX) path > > resolution without breaking too many things. Will try that later... > > > > Comments? > > Hell, NO. This is unspeakably tasteless. And full of lovely corner cases wrt > symlink bodies, etc. It's disabled inside symlink body resolution. Rules are simple: - strip off trailing part after first instance of /// - perform path lookup as normal - resolve meta path after /// on result of normal lookup Thanks, Miklos