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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 C1045C3F2D5 for ; Fri, 28 Feb 2020 17:15:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 997AB246A3 for ; Fri, 28 Feb 2020 17:15:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726874AbgB1RPU (ORCPT ); Fri, 28 Feb 2020 12:15:20 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:34502 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726562AbgB1RPT (ORCPT ); Fri, 28 Feb 2020 12:15:19 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1j7jE8-002VQ3-Fz; Fri, 28 Feb 2020 17:15:04 +0000 Date: Fri, 28 Feb 2020 17:15:04 +0000 From: Al Viro To: Miklos Szeredi Cc: Greg Kroah-Hartman , Ian Kent , Karel Zak , Miklos Szeredi , James Bottomley , Steven Whitehouse , David Howells , Christian Brauner , Jann Horn , "Darrick J. Wong" , Linux API , linux-fsdevel , lkml , Lennart Poettering , Zbigniew =?utf-8?Q?J=C4=99drzejewski-Szmek?= , util-linux@vger.kernel.org Subject: Re: [PATCH 00/17] VFS: Filesystem information and notifications [ver #17] Message-ID: <20200228171504.GK23230@ZenIV.linux.org.uk> References: <1c8db4e2b707f958316941d8edd2073ee7e7b22c.camel@themaw.net> <3e656465c427487e4ea14151b77d391d52cd6bad.camel@themaw.net> <20200227151421.3u74ijhqt6ekbiss@ws.net.home> <20200228122712.GA3013026@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-api-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org On Fri, Feb 28, 2020 at 05:24:23PM +0100, Miklos Szeredi wrote: > On Fri, Feb 28, 2020 at 1:27 PM Greg Kroah-Hartman > wrote: > > > > Superblocks and mounts could get enumerated by a unique identifier. > > > mnt_id seems to be good for mounts, s_dev may or may not be good for > > > superblock, but s_id (as introduced in this patchset) could be used > > > instead. > > > > So what would the sysfs tree look like with this? > > For a start something like this: > > mounts/$MOUNT_ID/ > parent -> ../$PARENT_ID > super -> ../../supers/$SUPER_ID > root: path from mount root to fs root (could be optional as usually > they are the same) > mountpoint -> $MOUNTPOINT > flags: mount flags > propagation: mount propagation > children/$CHILD_ID -> ../../$CHILD_ID > > supers/$SUPER_ID/ > type: fstype > source: mount source (devname) > options: csv of mount options Oh, wonderful. So let me see if I got it right - any namespace operation can create/destroy/move around an arbitrary amount of sysfs objects. Better yet, we suddenly have to express the lifetime rules for struct mount and struct superblock in terms of struct device garbage. I'm less than thrilled by the entire fsinfo circus, but this really takes the cake. In case it needs to be spelled out: NAK.