From mboxrd@z Thu Jan 1 00:00:00 1970 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=-4.0 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 2B940C433DF for ; Tue, 11 Aug 2020 16:05:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C076208B3 for ; Tue, 11 Aug 2020 16:05:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729038AbgHKQFm (ORCPT ); Tue, 11 Aug 2020 12:05:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728797AbgHKQFl (ORCPT ); Tue, 11 Aug 2020 12:05:41 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAF4BC06174A; Tue, 11 Aug 2020 09:05:41 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1k5WmM-00DeT8-FM; Tue, 11 Aug 2020 16:05:34 +0000 Date: Tue, 11 Aug 2020 17:05:34 +0100 From: Al Viro To: Linus Torvalds Cc: Miklos Szeredi , linux-fsdevel , David Howells , Karel Zak , Jeff Layton , Miklos Szeredi , Nicolas Dichtel , Christian Brauner , Lennart Poettering , Linux API , Ian Kent , LSM , Linux Kernel Mailing List Subject: Re: file metadata via fs API (was: [GIT PULL] Filesystem Information) Message-ID: <20200811160534.GL1236603@ZenIV.linux.org.uk> References: <1842689.1596468469@warthog.procyon.org.uk> <1845353.1596469795@warthog.procyon.org.uk> <20200811135419.GA1263716@miu.piliscsaba.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 08:20:24AM -0700, Linus Torvalds wrote: > I don't think this works for the reasons Al says, but a slight > modification might. > > IOW, if you do something more along the lines of > > fd = open(""foo/bar", O_PATH); > metadatafd = openat(fd, "metadataname", O_ALT); > > it might be workable. > > So you couldn't do it with _one_ pathname, because that is always > fundamentally going to hit pathname lookup rules. > > But if you start a new path lookup with new rules, that's fine. Except that you suddenly see non-directory dentries get children. And a lot of dcache-related logics needs to be changed if that becomes possible. I agree that xattrs are garbage, but this approach won't be a straightforward solution. Can those suckers be passed to ...at() as starting points? Can they be bound in namespace? Can something be bound *on* them? What do they have for inodes and what maintains their inumbers (and st_dev, while we are at it)? Can _they_ have secondaries like that (sensu Swift)? Is that a flat space, or can they be directories? Only a part of the problems is implementation-related (and those are not trivial at all); most the fun comes from semantics of those things. And answers to the implementation questions are seriously dependent upon that...