Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp479248pxa; Wed, 12 Aug 2020 06:57:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx++7itJVUu/fYPshwRlvnI3dBuhTiduZmgDZ1j4TEVJw87qW+5spxkjl9Tq740SsIJWFMr X-Received: by 2002:a50:fd19:: with SMTP id i25mr175eds.101.1597240647052; Wed, 12 Aug 2020 06:57:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597240647; cv=none; d=google.com; s=arc-20160816; b=apaKFz7lsBc6JxdGBCUXLdCV8bWFE+cMZ84clcY8hnA+nSjF112sTfdm4jKTDtcH6o hhtzlMKyfb3T/vgIH73tx6ln9Q3CRKALmrS/uch5gTPZymbYlLW5BgW0mnj0JzzvyL2p o1ttyMrogyKMJDCFttCHSW2H5RFWxX0XiyaoJTolZxILR4Omiym86kfgJFzIVDboFj2n plqK9ajqSNUnccctw2QoOIqzeNdSizu2MHsI8qlzayxRNfXFzB5ztb8tOge/IlTu1lyE IXL/uzQ7jO0AfgPA3NXFApl3RA7X9kbp151XjNIbOE+BA+k6IMicayUJ9JH8F8vpDxNA aoTg== 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=hZcIucU/ldxd0dbDYM4XtjXVSKv642KUcN/yZSDiGto=; b=pL59KZ0mI6+coYhfrQMtLLeHUR9PAX+xwL4KpdHt1PqMBsp70G4gLUudGl3D4Z+fnv hVjLRA04OYqZUE6nvfpJ8pBNw30eOBNEGIruCbzGUDJBjBoyWpgPe3F1iD0jxUuKiEA9 e3/adTrG0ycrhEfqLwANaVPvCRncWVEf1Gr7PGyRjFKhhjy2iluqPgEked5Q3399qQ/J GVBM6rOJ4IkGlJ4MtbfMq8KQ4V9WRO6pDv1aMkDdV9k8P8dIsYfCqm8C6DqaWcrsKAI3 0lnRTPkQX2iBkhyxwzSAWfH7htVOCDgbKmKQizlvZB4VvLbSU98dhHtmQ2LBQ7XM0+wv BmDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=XRtuwHdx; 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 qc15si1161679ejb.658.2020.08.12.06.57.03; Wed, 12 Aug 2020 06:57:27 -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=XRtuwHdx; 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 S1728135AbgHLNzE (ORCPT + 99 others); Wed, 12 Aug 2020 09:55:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727817AbgHLNzE (ORCPT ); Wed, 12 Aug 2020 09:55:04 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A6B9C061384 for ; Wed, 12 Aug 2020 06:55:04 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id a26so2382382ejc.2 for ; Wed, 12 Aug 2020 06:55:04 -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=hZcIucU/ldxd0dbDYM4XtjXVSKv642KUcN/yZSDiGto=; b=XRtuwHdxJqOzPIFxerMkyp8hhNxNJMsP2AwEx7trHlV+heDqTH77rrr6fEaAGI5sq8 gvZQXMiSqqMWj9SIJNysFAtJVN2JUflQ+Ggha4iGRaHB9eBRRtdYycXaP1afY2gc/1Gi blQ5bCn2ECUSS5OJ+iE2oN8giTALSTWteYRUo= 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=hZcIucU/ldxd0dbDYM4XtjXVSKv642KUcN/yZSDiGto=; b=f5vDEDJcKmKD1C2mc9f+902VhPJwgscftpahPRAz7VMQ53kXDXnI4cuTv9fhXpbYhi xX0p05Fz/DksMLtG77eCLi+twy+KAI2y4rhjdA1cttBap2ypfB1+vkX5SLSV9eGLJzCu CwbgpBmWkqgLZwbJjmzu+gsdVSfRDE2U0qBWYhf+4W0QTgtl4T7ixnNg/xsN/1GDGQ4J OWqxXU2Uq7SH0X9YGkTQyXaLnK2Vc9mzj0zgRgx3pdRJ4MSMFZH8fIHqrxYkKKOceTg7 kQYHlCaQlu6vc9ExBZyEk8u1mmpEh5eraBOiBcYfMRSh2m7aX1DFWWmIAGYowEV+6XpP Zevw== X-Gm-Message-State: AOAM531jsY7a1sZKcIGIWCPk7H3E/hCNEFG3QB0tmnuq9WUBVdKMPhWW FV882oWaAJWYlQuyylgV6+VGM2tOevMzRxSFy0esuL18nGBAVQ== X-Received: by 2002:a17:907:405f:: with SMTP id ns23mr30169147ejb.511.1597240501997; Wed, 12 Aug 2020 06:55:01 -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> <20200812101405.brquf7xxt2q22dd3@ws.net.home> <133508.1597239193@warthog.procyon.org.uk> In-Reply-To: <133508.1597239193@warthog.procyon.org.uk> From: Miklos Szeredi Date: Wed, 12 Aug 2020 15:54:50 +0200 Message-ID: Subject: Re: file metadata via fs API (was: [GIT PULL] Filesystem Information) To: David Howells Cc: Karel Zak , Linus Torvalds , linux-fsdevel , Al Viro , 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 3:33 PM David Howells wrote: > > Miklos Szeredi wrote: > > > You said yourself, that what's really needed is e.g. consistent > > snapshot of a complete mount tree topology. And to get the complete > > topology FSINFO_ATTR_MOUNT_TOPOLOGY and FSINFO_ATTR_MOUNT_CHILDREN are > > needed for *each* individual mount. > > That's not entirely true. > > FSINFO_ATTR_MOUNT_ALL can be used instead of FSINFO_ATTR_MOUNT_CHILDREN if you > want to scan an entire subtree in one go. It returns the same record type. > > The result from ALL/CHILDREN includes sufficient information to build the > tree. That only requires the parent ID. All the rest of the information > TOPOLOGY exposes is to do with propagation. > > Now, granted, I didn't include all of the topology info in the records > returned by ALL/CHILDREN because I don't expect it to change very often. But > you can check the event counter supplied with each record to see if it might > have changed - and then call TOPOLOGY on the ones that changed. IDGI, you have all these interfaces but how will they be used? E.g. one wants to build a consistent topology together with propagation and attributes. That would start with FSINFO_ATTR_MOUNT_ALL, then iterate the given mounts calling FSINFO_ATTR_MOUNT_INFO and FSINFO_ATTR_MOUNT_TOPOLOGY for each. Then when done, check the subtree notification counter with FSINFO_ATTR_MOUNT_INFO on the top one to see if anything has changed in the meantime. If it has, the whole process needs to be restarted to see which has been changed (unless notification is also enabled). How does the atomicity of FSINFO_ATTR_MOUNT_ALL help with that? The same could be done with just FSINFO_ATTR_MOUNT_CHILDREN. And more importantly does level of consistency matter at all? There's no such thing for directory trees, why are mount trees different in this respect? > Text interfaces are also a PITA, especially when you may get multiple pieces > of information returned in one buffer and especially when you throw in > character escaping. Of course, we can do it - and we do do it all over - but > that doesn't make it efficient. Agreed. The format of text interfaces matters very much. Thanks, Miklos