Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp546097pxa; Tue, 11 Aug 2020 09:07:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuZeKcNuFzDIgOZ+IG7F12eiiyEMHp3wOd8xDy5ZwEUxKPVEJhL+pzhoLPUo3PdIQpSsNm X-Received: by 2002:a50:fe98:: with SMTP id d24mr9068505edt.90.1597162072584; Tue, 11 Aug 2020 09:07:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597162072; cv=none; d=google.com; s=arc-20160816; b=Euq1M6XhVJvfarBn0RwFzmSvDSSpVIFsipi4/0ibPjsFbt9Iq8SB+jON52YoUkAqoA 9Nksk5oqJJk7mBFYzBlUJ83mtIwcyls5bOVLV1pQjDr8ADll88/MMATq2ItZt2/zsIUM aiznYX6BRKIWZ3t89o89iiJSsjSS5TxHvtkH0TOWzxoIUvWG6JX0rlr9dy2hEMm8g1Aw Z/Sy9RFaL0B8MuxLooiKlZZoJmetEtL+s7wcP1o1lJzwmXTPvbN96g53QdclCzrTAzbE C4GhK+Yrmmk7VhQe3XjnMyUdN8lgmKvReNDCQLCRmHgOgIyqJHYoxoP0/5ylH52eJzDu WdeQ== 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=LM4jBsQMzRRDK/34QKUyfcJDWJhksJw26XHd2o7K/hw=; b=n6ZxqPYa60OWSxQXQlmQNbWW4qX8lRjzvV77F6Ynsz1Ng8fswMlcYY+kbC7yHEUsXv mgu3MN40jIW6ybPQvxt2hZk7tU1RfUWc7vooERa9qmyfXHCeQ6IwVIKaBOC1iZjsozSX JCRkSvPcWOwyK4bAD85GpqK6+WtzbSC8tyLYbSxAgdSB1zabfn6wBeunMnQsTNAUd2ii lyo4bbvhkuukPQTvf5mw8SU5SjnddURYLQOPXY0d+kIOZEgZROxM+1KTnMaq1Ake5yrX CviAemA4yUbfYnJNxcq+m+l17UHTLhmWUUZE0pbV5iYWt8FbHf1orxNRik8WJVcdhNBL UIZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=h5REYG6B; 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 o17si9251370ejg.21.2020.08.11.09.07.29; Tue, 11 Aug 2020 09:07:52 -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=pass header.i=@linux-foundation.org header.s=google header.b=h5REYG6B; 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 S1729078AbgHKQFq (ORCPT + 99 others); Tue, 11 Aug 2020 12:05:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729008AbgHKQFm (ORCPT ); Tue, 11 Aug 2020 12:05:42 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEE3EC061787 for ; Tue, 11 Aug 2020 09:05:41 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id f26so12716253ljc.8 for ; Tue, 11 Aug 2020 09:05:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LM4jBsQMzRRDK/34QKUyfcJDWJhksJw26XHd2o7K/hw=; b=h5REYG6BLAhcl7YCtx2yrw4ToGBDJU4uXkvyEjPSm/S5Qgt/fykHaqSq3JywpXVzhk cx/W8MOJkg0ndiBLZgviuz2vr1RU763vUQcJdmRoZ6xko8AzSyxIh/lsVnNs/b3a8lQl 8o4utRdytVjQvpDmIMQfxUgnL+ljmt3Z+u/5I= 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=LM4jBsQMzRRDK/34QKUyfcJDWJhksJw26XHd2o7K/hw=; b=qIXAp3AvfBPF2DQVK1ADmiWwB+9YWf1jwIyYoOc2CDt/GFx4OYwrqnG3JeFyPVfdxs 7TtUVu+OFaOsvVmXvt0D6zXHY+n8B48PjYxYintVtc1cvUAS/1K2chlbocCGieFgBA7C N2LQ8n8nzSVzWYSUz4LAqH/Z/rW2yoQw+tZ43EP/k7BJ+JNF6Ti363fYjkBRvyT6nkYZ 3HzoUftZ8gQGepfBZ81QQLh8c7DdGJPv2Mv111mFKJKmvcq9dHv2PzTQoAd0az2BePW5 ym6sbXMNaFTCcYuYvNfCf7NN4ngVAprmee7F+8epXBNF4WM9FIcfvfdwiHflFoVtL1at nAgQ== X-Gm-Message-State: AOAM531/TobHwNf58B5GhoO2qYTCXOTYIfvu9rudF/ppkaiX3WLTyTU4 AcUOFHMaab+Z5YafcPpyIGEpSmK9aes= X-Received: by 2002:a2e:2a86:: with SMTP id q128mr3039629ljq.116.1597161939440; Tue, 11 Aug 2020 09:05:39 -0700 (PDT) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com. [209.85.208.174]) by smtp.gmail.com with ESMTPSA id u9sm11728760lfl.75.2020.08.11.09.05.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Aug 2020 09:05:39 -0700 (PDT) Received: by mail-lj1-f174.google.com with SMTP id 185so14118080ljj.7 for ; Tue, 11 Aug 2020 09:05:38 -0700 (PDT) X-Received: by 2002:a2e:2e04:: with SMTP id u4mr3184107lju.102.1597161938384; Tue, 11 Aug 2020 09:05:38 -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> In-Reply-To: From: Linus Torvalds Date: Tue, 11 Aug 2020 09:05:22 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: file metadata via fs API (was: [GIT PULL] Filesystem Information) To: Miklos Szeredi Cc: linux-fsdevel , David Howells , Al Viro , Karel Zak , Jeff Layton , Miklos Szeredi , Nicolas Dichtel , Christian Brauner , Lennart Poettering , Linux API , Ian Kent , LSM , Linux Kernel Mailing List 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 8:30 AM Miklos Szeredi wrote: > > What's the disadvantage of doing it with a single lookup WITH an enabling flag? > > It's definitely not going to break anything, so no backward > compatibility issues whatsoever. No backwards compatibility issues for existing programs, no. But your suggestion is fundamentally ambiguous, and you most definitely *can* hit that if people start using this in new programs. Where does that "unified" pathname come from? It will be generated from "base filename + metadata name" in user space, and (a) the base filename might have double or triple slashes in it for whatever reasons. This is not some "made-up gotcha" thing - I see double slashes *all* the time when we have things like Makefiles doing srctree=../../src/ and then people do "$(srctree)/". If you haven't seen that kind of pattern where the pathname has two (or sometimes more!) slashes in the middle, you've led a very sheltered life. (b) even if the new user space were to think about that, and remove those (hah! when have you ever seen user space do that?), as Al mentioned, the user *filesystem* might have pathnames with double slashes as part of symlinks. So now we'd have to make sure that when we traverse symlinks, that O_ALT gets cleared. Which means that it's not a unified namespace after all, because you can't make symlinks point to metadata. Or we'd retroactively change the semantics of a symlink, and that _is_ a backwards compatibility issue. Not with old software, no, but it changes the meaning of old symlinks! So no, I don't think a unified namespace ends up working. And I say that as somebody who actually loves the concept. Ask Al: I have a few times pushed for "let's allow directory behavior on regular files", so that you could do things like a tar-filesystem, and access the contents of a tar-file by just doing cat my-file.tar/inside/the/archive.c or similar. Al has convinced me it's a horrible idea (and there you have a non-ambiguous marker: the slash at the end of a pathname that otherwise looks and acts as a non-directory) Linus