From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: Adding subroot information to /proc/mounts, or obtaining that through other means Date: Wed, 20 Jun 2007 15:39:57 -0700 Message-ID: <4679ACBD.4090200@zytor.com> References: <467994BD.6000403@zytor.com> <20070620210343.GQ21478@ftp.linux.org.uk> <20070620222437.GY7226@petra.dvoda.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Al Viro , Linux Kernel Mailing List , linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, util-linux-ng-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Karel Zak Return-path: In-Reply-To: <20070620222437.GY7226-CxBs/XhZ2BtHjqfyn1fVYA@public.gmane.org> Sender: util-linux-ng-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org Karel Zak wrote: > > Yeah. How about include propagation trees to this file? > > mountpoint + ID + relative path + type + options + propagation-flag + > {peer,master}-mount-id > > / 0xa917800 / ext3 rw PRIVATE > /mnt 0xa917100 / ext3 rw SHARED peer:0xa917100 > /tmp 0xa917f00 /1 ext3 rw SLAVE master:0xa917100 > I think we're talking about a different meaning of "id" here... you seem to be talking about the vfsmount pointer, whereas it was originally proposed as mnt_sb->sb_dev. Both are useful, for different reasons of course. We should include mnt_devname as well. People are a bit nervous about exposing kernel pointers in userspace, I have noticed; would it be better to add a "mnt_id" field to struct vfsmount; this can simply be a counter assigned when the structure is assigned and then never changed (it might have to be a 64-bit counter, but I don't think that adding 8 bytes to struct vfsmount should be a huge deal.) Does that service everyone's needs? -hpa