Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp615367ybb; Wed, 1 Apr 2020 06:38:07 -0700 (PDT) X-Google-Smtp-Source: APiQypJpSk98+ilOTTY5k+PpB6agyID8lsDRLXHiKbvUr9Dh9qDfsbwHVGTGg6wyNEU7mhrxNmma X-Received: by 2002:aca:682:: with SMTP id 124mr2841835oig.69.1585748286973; Wed, 01 Apr 2020 06:38:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585748286; cv=none; d=google.com; s=arc-20160816; b=uVqw0F2XUZw1zzwDqaDZCxYzJEIhYoYkRekdG6GFGBhalrzyUlY8kw3NQ4ABD4fCGB K6gNMFR+MYiSI2c5Os7iyuU8Bb714haJffxPTGqCRfIl7Zly5soABcnCzNs9onaeBgL0 R1otYhhvQvltvQcRotNs8cKh6hrg4m4iEITWeos5Q9CvSgDKAUjneJlOhinM1jTbz+DC /aD5bJCErETk53XuFhp71iey5NUL5+qOUdJkqHJG18wEgpaksrKE2VsYYCosU/AqEBlu 7mNKE8Xgui3v36JOvSCgRZZY3tydkp+x05uolOo9/f3N4NHDA3atrb8tmurN7HXyl8tU LHiQ== 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=vvMhsyalHgLR7BhFwzAsPtNqVbCXBf3wROS4TZNwS2o=; b=xQ3CRyKc3EfE24QpM65jY8h7iZD4i7odLstVMo0nlmOvdHHhCIVa0iNaBmanrT6nh5 5k2cVfSN70Yeum4GQ7g7uZHujXKof+2r7xFeur3t+xBAYyweHP/o7LeZj1Im+p/XcZOo VUjuQtfkqMuP+5gSr0+r8TD1/RdPI8Pz4/a+LqU7LitDRyiVcVSuS9k5gjD4R7hH9pPr 4ptkoKKArQop/FjuJREX+/BqT1Uu7p2u7PLgEjic+d4+xpoBBfEYH/+NHrNJ3Aqs7E0Y YJmJL1ocIkBRElU4JtnttWHblc8JjRtJ/dhyLSjhGhyHu8tN2e4+cyZxKyxQAlaCA7tI YWYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=dJzquYYl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x73si933380oif.16.2020.04.01.06.37.53; Wed, 01 Apr 2020 06:38:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=dJzquYYl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732651AbgDANer (ORCPT + 99 others); Wed, 1 Apr 2020 09:34:47 -0400 Received: from mail-ed1-f43.google.com ([209.85.208.43]:40122 "EHLO mail-ed1-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732587AbgDANer (ORCPT ); Wed, 1 Apr 2020 09:34:47 -0400 Received: by mail-ed1-f43.google.com with SMTP id w26so29590255edu.7 for ; Wed, 01 Apr 2020 06:34:43 -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=vvMhsyalHgLR7BhFwzAsPtNqVbCXBf3wROS4TZNwS2o=; b=dJzquYYlrEleQ255CNcwNKohJNgWkZ0preJPVYpCjZ+FTERm/igjSD889iQgLotvB1 JQTsU14tWQbRa+xx5icx3fWophVuRCJKg4X4IpINCAHbIH15Qx5oUFEtINoXlKljmYRt 8kD7k4R6FT5gPp47zwJs/pvfUjM25V9X6ksiw= 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=vvMhsyalHgLR7BhFwzAsPtNqVbCXBf3wROS4TZNwS2o=; b=M4ftegg/5/40vN+TYaBfkCJE6VbeCEpJhnd029Ps9dY/22v+ORJfP0ial4wX+BAqAB IdbfIoNFtJkgBWTT54RpfEqaq8RinT908uolPjOAOwYKNCf2DtgocF0NS5V4eFbl9v+5 zdzYiBKYgT538YJPycgaeD2MxhK5sX3aGeGDNT9+nEPV4cGPmRz3SMBYvQS127jH+0b1 WXeq4LCBsfOlRRRfhvYPynlGwCuV51mX+g7Y7Hc7mzcftMG5fBOzhg1irZt7mgAtHb8l B3kuMx+v1+Dib19V9TIGGki09FCNbEM+GsNQu8kEAyG4guLFUdwdEBvb5V6BnHfk3XWu dk8Q== X-Gm-Message-State: ANhLgQ13ipUAG/GzHWrrlMq/pNtvBeo7D1k4BPyczmLss2Lt1ucqrFCF UpL6sG826E0qtTiHJSDXnW8CmsTl9TcytOsYceyv6A== X-Received: by 2002:a17:906:6545:: with SMTP id u5mr11392194ejn.27.1585748082818; Wed, 01 Apr 2020 06:34:42 -0700 (PDT) MIME-Version: 1.0 References: <20200330211700.g7evnuvvjenq3fzm@wittgenstein> <1445647.1585576702@warthog.procyon.org.uk> <2418286.1585691572@warthog.procyon.org.uk> <20200401090445.6t73dt7gz36bv4rh@ws.net.home> In-Reply-To: <20200401090445.6t73dt7gz36bv4rh@ws.net.home> From: Miklos Szeredi Date: Wed, 1 Apr 2020 15:34:31 +0200 Message-ID: Subject: Re: Upcoming: Notifications, FS notifications and fsinfo() To: Karel Zak Cc: David Howells , Christian Brauner , Linus Torvalds , Al Viro , dray@redhat.com, Miklos Szeredi , Steven Whitehouse , Jeff Layton , Ian Kent , andres@anarazel.de, keyrings@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Lennart Poettering , Aleksa Sarai Content-Type: multipart/mixed; boundary="0000000000002e407205a23abf26" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --0000000000002e407205a23abf26 Content-Type: text/plain; charset="UTF-8" On Wed, Apr 1, 2020 at 11:05 AM Karel Zak wrote: > > On Tue, Mar 31, 2020 at 10:52:52PM +0100, David Howells wrote: > > Christian Brauner wrote: > > > > > querying all properties of a mount atomically all-at-once, > > > > I don't actually offer that, per se. > > > > Having an atomic all-at-once query for a single mount is actually quite a > > burden on the system. There's potentially a lot of state involved, much of > > which you don't necessarily need. > > If all means "all possible attributes" than it is unnecessary, for > example ext4 timestamps or volume uuid/label are rarely necessary. > We usually need together (as consistent set): > > source > mountpoint > FS type > FS root (FSINFO_ATTR_MOUNT_PATH) > FS options (FSINFO_ATTR_CONFIGURATION) > VFS attributes > VFS propagation flags > mount ID > parent ID > devno (or maj:min) This is trivial with mountfs (reuse format of /proc/PID/mountinfo): # cat /mnt/30/info 30 20 0:14 / /mnt rw,relatime - mountfs none rw Attached patch applies against readfile patch. We might want something more generic, and it won't get any simpler: mount.h | 1 + mountfs/super.c | 12 +++++++++++- proc_namespace.c | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) Thanks, Miklos --0000000000002e407205a23abf26 Content-Type: text/x-patch; charset="US-ASCII"; name="mountfs-info.patch" Content-Disposition: attachment; filename="mountfs-info.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k8hdan1o0 LS0tCiBmcy9tb3VudC5oICAgICAgICAgIHwgICAgMSArCiBmcy9tb3VudGZzL3N1cGVyLmMgIHwg ICAxMiArKysrKysrKysrKy0KIGZzL3Byb2NfbmFtZXNwYWNlLmMgfCAgICAyICstCiAzIGZpbGVz IGNoYW5nZWQsIDEzIGluc2VydGlvbnMoKyksIDIgZGVsZXRpb25zKC0pCgotLS0g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