Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp875276ybf; Fri, 28 Feb 2020 09:15:50 -0800 (PST) X-Google-Smtp-Source: APXvYqwHqYpxkJXbGhUd8PD8J/4TWQ/jHDFUQJXW/ahQP78WkKh84zwqnT0cbA1q3Owbkm/ETFEf X-Received: by 2002:a05:6808:487:: with SMTP id z7mr3978512oid.59.1582910150186; Fri, 28 Feb 2020 09:15:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582910150; cv=none; d=google.com; s=arc-20160816; b=zjJYxI+I5SU1ccNiU4uVun0wgLrbikLW02ppTMQBxzBaZ0LqW23MqnniIhIMxNxin9 LPmvInr2EdnOFyW2xNcrtfU8/2eaOpYM4SnjZ8ourxitz97Wvvx6Wt4nZ4yzDlsRlTBV mTMrAeRciEJb80Te6y3xMi60KFiHaXGTPdFG49HZ73QE4hDeTqdTv6S2KVz4GtFh4D5H oPES6oyImsi9/VPdQSRCjaK909C+iYoEnXdFnIM04KWldBcHJrqcnJ6dNE6SstCV+kxY KZZoSQEEaC6XTO24BjeiYW/8Eofcc9WloaUNl2w417L+8Ju3VQODoQ5M1mc8CStdxzH8 NtRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Q0ybOimy5PzqtZ4e5caHWXVPaBR3JtD1XtqTNz4XyiA=; b=04O0J1HXtsvyW1NrP5JdsnBK34Ti7ESJeeI7vAPUWtNOIZNYzlqSbT+oLlRcHcNhox Yzy4l8iP2HBuU4/b6JWrZOxdF89LFmjoJDAHFjDQKF9NrLQxgxpMRQLF4oKwXnVawjxz FEKM8688npuKxFSP93EY3L4FyftUwMoEFaYuQHLQhaEcMNHSmKMmZ88TpJCSKO3T0rVH UoY+Yxru7B1+PyIY69j783WeOtoJZ88IGCot3W/34nb329wY8GGUQkWOONGq9ALQ8aND k9jDwHr6Zwm4n0w1tuyLLEgtMrB2Bddcbsg20mC/on1ElIHvhRHauYMcglfeAiSNC21U sOUg== ARC-Authentication-Results: i=1; mx.google.com; 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 f62si2142009oib.131.2020.02.28.09.15.38; Fri, 28 Feb 2020 09:15:50 -0800 (PST) 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; 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 S1726894AbgB1RPU (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.