Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2960333pxa; Tue, 18 Aug 2020 02:43:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfZELVh4Gy8p+P8DAeOYdoRwC14I2k5KoGl1KQwijNE0kQJv1yvhihvgk9IFE+cRRBnBVW X-Received: by 2002:a17:906:e289:: with SMTP id gg9mr20236174ejb.448.1597743812161; Tue, 18 Aug 2020 02:43:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597743812; cv=none; d=google.com; s=arc-20160816; b=JSJC6Oe3qLfyb4BFE7aYLABIDd+6EYnfz6efnBNq1Vbf1b9+WYyrKBAnJO771cjOKd UwR1ZHvXDh1u8WJjBb5xKqOyczxDFd+VAlqPnvj7bULTbZIjsAywp4FIIOqhK6GcSioz 2Z1rErfGWcogRoY5RTrqVM3+AtzqRobDjcu0ynQfU3/nf02gdDxDv+J2B/TXbotXOBPe xjRwo0weaNk5RYP0umzdW8KCRC+/4JWF13zpE8GkjsBmo4/oCRsklbVgz9BLBYe0CtnR dsnrqgcDU7SYa0jpAwatmWcjgFbt+WGB40H6JjpM69SUp7Wm2kVQctowiI6EKjB4dSGK DFCw== 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=Dv1Xhl1bS+5jEQYbFML/aNrkT6FMSIT4YIWLINTkYuA=; b=EI8DYZUiH6UIF99e0JECSnBeMo2As/Xzf5EiirEqvzFq8HyXlTUMMcIpKIbi3JjoLA /TcJWz9BOUxW4gPFoP9q18M9He9deUE68bYVaFbd5fX7H7V84N2aKSYggYAI6fvY0KJo OH8GnoDyocy+Ydkri3sxS4B3pyD2GoRkUZyMlUMtxkWNX16QHOTGdr/JzB3687MyKlwS ENcRmn62Pepo6uJ5gwHgvJBpZLcJOacIZgBmsyttNCukxZMIWLVv/PtmU1wVip1e8EFL VgftAI9TPgtPksMw50WM7Mo+d3LNWWtaR8GPvO10lEUDI3/sL7Wi2cFUFgpdygXPdKPC OUZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=TKBIZQ9c; 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 cm21si12866478edb.111.2020.08.18.02.43.08; Tue, 18 Aug 2020 02:43:32 -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=TKBIZQ9c; 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 S1726145AbgHRJlq (ORCPT + 99 others); Tue, 18 Aug 2020 05:41:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726370AbgHRJlo (ORCPT ); Tue, 18 Aug 2020 05:41:44 -0400 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF1D7C061342 for ; Tue, 18 Aug 2020 02:41:42 -0700 (PDT) Received: by mail-ej1-x641.google.com with SMTP id qc22so21299484ejb.4 for ; Tue, 18 Aug 2020 02:41:42 -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=Dv1Xhl1bS+5jEQYbFML/aNrkT6FMSIT4YIWLINTkYuA=; b=TKBIZQ9cEM0s7XlAhqk+9WuMaJ5WAzHt28fYx7z2YcY+Ky15uWjPK9XQAlE4GEUNqa mV0SnmJ2Gpom5vx/h8sEIfNfZa5zbCrKs2dnoVh0T89qV+LR7R+5+3MROncxObXPQArg /jnklxkh2Vw4IJ9BkaOQd5d8BqCmxE3VXbUS4= 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=Dv1Xhl1bS+5jEQYbFML/aNrkT6FMSIT4YIWLINTkYuA=; b=fJ5G3rqs6imjtTI2Qe2dubCZlzR9h6Ex26wUqMWLR9ED/GeRrt8DKHAj63pC603UZB 5ynBFG/SJITkkQOx9WUTDLgFNXoBwSUZQMiT86kKr6wTYb/T6BLufRFhvWf9Z/WtJKZZ Y2LYyypuZx4SegGKDnKNz+aEG3guaX4SCduOVeU+Q2t+tBPmd7NA9lx+DzbMT95RslrT TQ8kb5cEH2sqe7OjZiaOTZx9vuNQ6UlPRrdXd1oONTkZ79/bYD2jbH5IB8lRJYNOz7E6 +CQDOLuEE/Qi2+9XNdK3HowiSUR1sDg8Sl7eOwYTjsOoOAzibjDrd/FeZZD05k2qvAMU /58w== X-Gm-Message-State: AOAM531p1ThMKIDgmC01Jn3JCMEULCSdG0Dbkty30C30OHRMJwj3J195 Haju2YQ906n2ABT0mFa68kXUAlUyvklF//6EJA4L6Q== X-Received: by 2002:a17:907:94ca:: with SMTP id dn10mr19044858ejc.110.1597743701266; Tue, 18 Aug 2020 02:41:41 -0700 (PDT) MIME-Version: 1.0 References: <20200812143957.GQ1236603@ZenIV.linux.org.uk> <20200812150807.GR1236603@ZenIV.linux.org.uk> <20200812163347.GS1236603@ZenIV.linux.org.uk> <20200812173911.GT1236603@ZenIV.linux.org.uk> <20200812183326.GU1236603@ZenIV.linux.org.uk> <20200812213041.GV1236603@ZenIV.linux.org.uk> In-Reply-To: <20200812213041.GV1236603@ZenIV.linux.org.uk> From: Miklos Szeredi Date: Tue, 18 Aug 2020 11:41:29 +0200 Message-ID: Subject: Re: file metadata via fs API (was: [GIT PULL] Filesystem Information) To: Al Viro Cc: Linus Torvalds , Jann Horn , Casey Schaufler , Andy Lutomirski , 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 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, Aug 12, 2020 at 11:30 PM Al Viro wrote: > > On Wed, Aug 12, 2020 at 07:33:26PM +0100, Al Viro wrote: > > > BTW, what would such opened files look like from /proc/*/fd/* POV? And > > what would happen if you walk _through_ that symlink, with e.g. ".." > > following it? Or with names of those attributes, for that matter... > > What about a normal open() of such a sucker? It won't know where to > > look for your ->private_data... > > > > FWIW, you keep refering to regularity of this stuff from the syscall > > POV, but it looks like you have no real idea of what subset of the > > things available for normal descriptors will be available for those. > > Another question: what should happen with that sucker on umount of > the filesystem holding the underlying object? Should it be counted > as pinning that fs? Obviously yes. > Who controls what's in that tree? It could be several entities: - global (like mount info) - per inode (like xattr) - per fs (fs specific inode attributes) - etc.. > If we plan to have xattrs there, > will they be in a flat tree, or should it mirror the hierarchy of > xattrs? When is it populated? open() time? What happens if we > add/remove an xattr after that point? From the interface perspective it would be dynamic (i.e. would get updated on open or read). From an implementation POV it could have caching, but that's not how I'd start out. > If we open the same file several times, what should we get? A full > copy of the tree every time, with all coherency being up to whatever's > putting attributes there? > > What are the permissions needed to do lookups in that thing? That would depend on what would need to be looked up. Top level would be world readable, otherwise it would be up to the attribute/group. > > All of that is about semantics and the answers are needed before we > start looking into implementations. "Whatever my implementation > does" is _not_ a good way to go, especially since that'll be cast > in stone as soon as API becomes exposed to userland... Fine. Thanks, Miklos