Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp665111pxa; Tue, 11 Aug 2020 11:53:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCQTghC0uRXodSRSz1H9g/g4ACgVNigaiCNRcsJHoUE/G45leEAxkjurrgcayBtj0JNzO9 X-Received: by 2002:a17:907:204e:: with SMTP id pg14mr2773072ejb.324.1597172001272; Tue, 11 Aug 2020 11:53:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597172001; cv=none; d=google.com; s=arc-20160816; b=crRAzRe039mm1k9w96oIi01ZBbK464xE57wVoqRjIABRt5FH4XcxGGRZmX5USb1BL9 7fXx3ZAeXpvM95GMk6tL7cX0chJjipg4BytHPfzvMfzqdyeDt6Nk4ewPVhyI150Q9m+9 pbWMP8oFe3JZjOl6KW0c0OLVzQ2r8P/MPOPn92hi2IZXi5HI9RjUFEkfqA7kRmQUgDKE M9drX3MmkBOOLnBdP7G8l7SdCsdTc1Af1XBIHfFgwBPZi7ew6aK/CqoLxdd6DACVCU4z iPfMBJLWvhj6Sqoq5IWCLviMDwGhdoiFuy7h9dBBf6mojewBSpk1Mn2fZRdW63dS84xa dxwg== 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=QR5EthpwytHc0ejjeS7AxrlPWVpWopYIIKYLKzP2Eq4=; b=a72WeqP7PZxwjDcAECeWS3BEpeCUYUDXYAXXQbxl1KyKiH44Cn1YWq17RMoRYf6RZD SvWJrbZIVr8b4jmPqCDBA+gAjtyS1KLZYI1lrRh5MIyuVl6Ai8Efm69wjOl1wdttC3qJ c3SyFBTZQeVjgLgBiy1JkWFKZiMCodlYy8+oR63r6TlKKmHaoh0e1CdqHuSYBdbmfVOO +IdyOCii6dqAOk92StkpeJ2HrVJ+hIbmSPiRewexi8c7dcRumw49+HEmc5urDOMtbW9w broIzIzolH7+KGFny4H5jMqAbqPAjFuksCu171HbKUYPh5xnuH2zDoPIJZuWZHH8HOC2 mIjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b="qsi/YfmV"; 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 y19si13214605ejw.738.2020.08.11.11.52.57; Tue, 11 Aug 2020 11:53:21 -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="qsi/YfmV"; 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 S1726472AbgHKStt (ORCPT + 99 others); Tue, 11 Aug 2020 14:49:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726454AbgHKSts (ORCPT ); Tue, 11 Aug 2020 14:49:48 -0400 Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32039C06174A for ; Tue, 11 Aug 2020 11:49:48 -0700 (PDT) Received: by mail-ej1-x642.google.com with SMTP id f24so14234502ejx.6 for ; Tue, 11 Aug 2020 11:49:48 -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=QR5EthpwytHc0ejjeS7AxrlPWVpWopYIIKYLKzP2Eq4=; b=qsi/YfmV5n8FbsFLNbmPsP/XkvX4WKPoDYdfXAcHJX7sKPLBuRLurDA3+/2q3dTeSc QR8qUCCSWYQi8swtBn5FT3wk2zToUXW4QeK5DefeOUHbAjTA30lN66ie4B4qXy6igVCz 4BHo6BVZ9hbN3e+PMfS3B/xKbDT6XmlbbOAG8= 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=QR5EthpwytHc0ejjeS7AxrlPWVpWopYIIKYLKzP2Eq4=; b=DI53jNzdyarr+K92SKhT9DeslQqKaNUSCLIZ+36yvBxs7KHD8Y3aLxbCBNxskPPlvC v0kW+16sj1IIOjTyJXRXz+GyX6V6Bt20ufn5pKOPOwroxNFjVhDeE8WOck1zFRM5kzrL MZkSaySbZukulk3pkBJXeEXt4DPG/3EJnt1hu6bvGOFtsqlENhb8FXwr9MWzt7osHt0y JrIOi53+KyolqlpUJUdBuabMuCXzKO1eTvJdFhTfHNLoPpvOTq19qISvdbiKGiEx4ABw 6RWSZXhd3erZo6gt7l8dAoF3KCMfUz04s27notnkTk3iuz0ndIMPrS0QfaQXok8s8dH7 cQYA== X-Gm-Message-State: AOAM533svUYs/tbFm1T4zFDm4rwLi8cwC99ax3V1aRnpSSRnp1NCGoME KcNWBDvcCriLEXnvqyRGdEUDwI9aMig1wVmYPztpRw== X-Received: by 2002:a17:907:94ca:: with SMTP id dn10mr27509087ejc.110.1597171786328; Tue, 11 Aug 2020 11:49:46 -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: Miklos Szeredi Date: Tue, 11 Aug 2020 20:49:35 +0200 Message-ID: Subject: Re: file metadata via fs API (was: [GIT PULL] Filesystem Information) To: Linus Torvalds 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 6:05 PM Linus Torvalds wrote: > 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. Oh, I have. That's why I opted for triple slashes, since that should work most of the time even in those concatenated cases. And yes, I know, most is not always, and this might just be hiding bugs, etc... I think the pragmatic approach would be to try this and see how many triple slash hits a normal workload gets and if it's reasonably low, then hopefully that together with warnings for O_ALT would be enough. > (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. That's exactly what I implemented in the proof of concept patch. > Which means that it's not a unified namespace > after all, because you can't make symlinks point to metadata. I don't think that's a great deal. Also I think other limitations would make sense: - no mounts allowed under /// - no ./.. resolution after /// - no hardlinks - no special files, just regular and directory - no seeking (regular or dir) > 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) Umm, can you remind me what's so horrible about that? Yeah, hard linked directories are a no-no. But it doesn't have to be implemented in a way to actually be a problem with hard links. Thanks, Miklos