Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2049953ybf; Mon, 2 Mar 2020 00:45:32 -0800 (PST) X-Google-Smtp-Source: APXvYqwnN7qLeQFU2hc3BOSeolRwDezMfiI7l2TaEtj1Iv9vC5uCoAI8e7mHTJ/GApSKKVqHIYEF X-Received: by 2002:aca:5d57:: with SMTP id r84mr10915723oib.42.1583138732292; Mon, 02 Mar 2020 00:45:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583138732; cv=none; d=google.com; s=arc-20160816; b=rrSYcDkjORJAfUwM1uVueVMgvlXtxkmfysT7D8M5jzSN05gh5zNosTPgk8zwERe44R 0ZQQSzTVjz0/ZrkDRdq+XDIZFvqSFejW2EchC3fbxPNi+I4yxMHDeOBkHyh1OpQiYpp8 UpuwtmWurr7S1HjLcqzVUMc/iBs5cx5rMqkww69HPS52KSB9Pgo+HWv7dWiRvBgbqqMb I2/OgzLdMrCEArDIl2jjLn7iU0qyhV8dYxgWRvvk5QLqnlwlmfvh5CF8O21zGf8ts9Zs wRnsjadIURT/eSlu6CuWWBjR3lEBFry5Zd2ztkYzzkR50V5YmoZYsmLNQn2KvxAQdot0 Mgiw== 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=ka6ngPWkB4uI/pE1Q1K94PHmSULgTaZNjlFBTfefkw4=; b=TKl3gTH+C3RmKQPmdfHhG2UigtyeDrBbrPsskuUo9buydJ02Xdv1kOJRIW3ATwFivX YefsU++RuYt8fwm68xCF38vImNz7himgzYKary1WGYzRB9ImCWu36aEySdWuf29SGWnQ U3ogpiN44umipp9JoYiwTAMTFhOH2HK8bDvKKPgR/hdiZLoe3nxcsW3gPx4B/Ek4okBD cXAOctjrSxZaOf2fkn9LDnHN3O+VlT7nc/YXGyjTmkyZHDL000iWamJsqSrgQOvjlvKR 8qDyJxh3khHf7K6fiUMfvcunOXjPdjMYTKqmwfHn1WmY8IFFbjmBCyJ34dI1bjjaQwHl pRCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=akz1HiDk; 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 t79si4764455oih.165.2020.03.02.00.45.19; Mon, 02 Mar 2020 00:45:32 -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; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=akz1HiDk; 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 S1727279AbgCBIn4 (ORCPT + 99 others); Mon, 2 Mar 2020 03:43:56 -0500 Received: from mail-io1-f67.google.com ([209.85.166.67]:42085 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726313AbgCBInz (ORCPT ); Mon, 2 Mar 2020 03:43:55 -0500 Received: by mail-io1-f67.google.com with SMTP id q128so2523446iof.9 for ; Mon, 02 Mar 2020 00:43:55 -0800 (PST) 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=ka6ngPWkB4uI/pE1Q1K94PHmSULgTaZNjlFBTfefkw4=; b=akz1HiDkzR/7aKhVBglfubu1x0knfiykucl/aRzUbwrNlqM8z3WDiA3Iil6Z9OI56T ChR/IQN1e7+3dN+PzJK9dYmO7ShfXhI/evyAyzUN1+AqipbTrdEURd4rjQfSGax9hS5M TdtlzKpbJ9nHP2YuSvOD/07ec4ijpwDRMIsNI= 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=ka6ngPWkB4uI/pE1Q1K94PHmSULgTaZNjlFBTfefkw4=; b=nkuHDuVTywI2qhuQnbuDFM5CahGzxoUOfWG/l1jrb09sIpKy5Hyy0xgl/qn04tMWv5 +rMx5liO1MamlzgC1ZXNDo/8nJSUTsKTHvgqrYbHdrkN/q2fYCNNnlL6lvOIXDyYhrBE ecJIRO5ekWL60+0le3Va/kZYRISRP2SdtmISGw/24RQXBUHYJ+ihEMwQ8lj7kjX4jzti /eEt5Ja1+FXccXKMKAO9jLD4E1AMVpZ0p+FMb6dmiS9+C98OUm0rU5ZX/ud9sCEhPU5I VfsHoP2AEv31osRtigqhAv/6Aymw1uoaP2TEoTX9UGiBRyZ3//GACCsjf9SG9vZH8jnP zqJg== X-Gm-Message-State: APjAAAUHuw2Pm2+WwTk//zMcKgRL/RKfdEdRoqWjsK15JW5ITYQvteox BgwZjl2AgPKUvXB+tkwH8CoQ2vb/RsHDXIxmZYxRbg== X-Received: by 2002:a02:5b8a:: with SMTP id g132mr12738776jab.78.1583138634949; Mon, 02 Mar 2020 00:43:54 -0800 (PST) MIME-Version: 1.0 References: <1c8db4e2b707f958316941d8edd2073ee7e7b22c.camel@themaw.net> <3e656465c427487e4ea14151b77d391d52cd6bad.camel@themaw.net> <20200227151421.3u74ijhqt6ekbiss@ws.net.home> <20200228122712.GA3013026@kroah.com> <20200228171504.GK23230@ZenIV.linux.org.uk> In-Reply-To: <20200228171504.GK23230@ZenIV.linux.org.uk> From: Miklos Szeredi Date: Mon, 2 Mar 2020 09:43:43 +0100 Message-ID: Subject: Re: [PATCH 00/17] VFS: Filesystem information and notifications [ver #17] To: Al Viro 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 , =?UTF-8?Q?Zbigniew_J=C4=99drzejewski=2DSzmek?= , util-linux@vger.kernel.org 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 Fri, Feb 28, 2020 at 6:15 PM Al Viro wrote: > > 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. Parent/children symlinks may be excessive... > Better yet, we suddenly have to express the lifetime rules for struct mount > and struct superblock in terms of struct device garbage. How so? struct mount and struct superblock would hold a ref on struct device, not the other way round. In any case, I'm not insistent on the use of sysfs device classes for this; struct device (488B) does seem too heavy for struct mount (328B). What I'm pretty sure about is that a read(2) based interface would be way more useful than the syscall multiplexer that the current proposal is. Thanks, Miklos