From: "H. Peter Anvin" <hpa@zytor.com>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org, util-linux-ng@vger.kernel.org
Subject: Re: Adding subroot information to /proc/mounts, or obtaining that through other means
Date: Thu, 21 Jun 2007 09:13:40 -0700 [thread overview]
Message-ID: <467AA3B4.6090609@zytor.com> (raw)
In-Reply-To: <20070620210343.GQ21478@ftp.linux.org.uk>
Al Viro wrote:
> On Wed, Jun 20, 2007 at 01:57:33PM -0700, H. Peter Anvin wrote:
>> ... or, alternatively, add a subfield to the first field (which would
>> entail escaping whatever separator we choose):
>>
>> /dev/md6 /export ext3 rw,data=ordered 0 0
>> /dev/md6:/users/foo /home/foo ext3 rw,data=ordered 0 0
>> /dev/md6:/users/bar /home/bar ext3 rw,data=ordered 0 0
>
> Hell, no. The first field is in principle impossible to parse unless
> you know the fs type.
>
> How about making a new file with sane format? From the very
> beginning. E.g. mountpoint + ID + relative path + type + options,
> where ID uniquely identifies superblock (e.g. numeric st_dev)
> and backing device (if any) is sitting among the options...
The more I'm thinking about this, I think it's simplest to just add
fields to the right of the existing /proc/*/mounts. Yes, the format is
ugly, and it will end up being uglier still, but it's also ugly to have
a bunch of different chunks of information formatted in different ways.
So, the existing fields are:
mnt_devname mnt_path filesystem_type options 0 0
... and we'd want to add ...
mnt_id propagation_info sb_dev path_to_fs_root
As previously stated, in order to avoid having to expose kernel
addresses to userspace, I suggest we simply add a counter field to
struct vfsmount and use that for mnt_id.
I'm not all that up on what is needed for propagation_info. I presume
we want to be able to deduce the full mount lattice. One particularly
important thing in my mind is to be able to distinguish overmounted
filesystems (which I think is possible in the current setup only by
ordering -- the filesystem on top I believe will end up last in
/proc/mounts, but I don't know if there actually is anything that
enforces that.)
-hpa
WARNING: multiple messages have this Message-ID (diff)
From: "H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
To: Al Viro <viro-rfM+Q5joDG/XmaaqVzeoHQ@public.gmane.org>
Cc: Linux Kernel Mailing List
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
util-linux-ng-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Adding subroot information to /proc/mounts, or obtaining that through other means
Date: Thu, 21 Jun 2007 09:13:40 -0700 [thread overview]
Message-ID: <467AA3B4.6090609@zytor.com> (raw)
In-Reply-To: <20070620210343.GQ21478-rfM+Q5joDG/XmaaqVzeoHQ@public.gmane.org>
Al Viro wrote:
> On Wed, Jun 20, 2007 at 01:57:33PM -0700, H. Peter Anvin wrote:
>> ... or, alternatively, add a subfield to the first field (which would
>> entail escaping whatever separator we choose):
>>
>> /dev/md6 /export ext3 rw,data=ordered 0 0
>> /dev/md6:/users/foo /home/foo ext3 rw,data=ordered 0 0
>> /dev/md6:/users/bar /home/bar ext3 rw,data=ordered 0 0
>
> Hell, no. The first field is in principle impossible to parse unless
> you know the fs type.
>
> How about making a new file with sane format? From the very
> beginning. E.g. mountpoint + ID + relative path + type + options,
> where ID uniquely identifies superblock (e.g. numeric st_dev)
> and backing device (if any) is sitting among the options...
The more I'm thinking about this, I think it's simplest to just add
fields to the right of the existing /proc/*/mounts. Yes, the format is
ugly, and it will end up being uglier still, but it's also ugly to have
a bunch of different chunks of information formatted in different ways.
So, the existing fields are:
mnt_devname mnt_path filesystem_type options 0 0
... and we'd want to add ...
mnt_id propagation_info sb_dev path_to_fs_root
As previously stated, in order to avoid having to expose kernel
addresses to userspace, I suggest we simply add a counter field to
struct vfsmount and use that for mnt_id.
I'm not all that up on what is needed for propagation_info. I presume
we want to be able to deduce the full mount lattice. One particularly
important thing in my mind is to be able to distinguish overmounted
filesystems (which I think is possible in the current setup only by
ordering -- the filesystem on top I believe will end up last in
/proc/mounts, but I don't know if there actually is anything that
enforces that.)
-hpa
next prev parent reply other threads:[~2007-06-21 16:17 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-20 20:57 Adding subroot information to /proc/mounts, or obtaining that through other means H. Peter Anvin
2007-06-20 20:57 ` H. Peter Anvin
2007-06-20 21:03 ` Al Viro
2007-06-20 21:20 ` H. Peter Anvin
2007-06-21 16:20 ` Ram Pai
2007-06-21 16:20 ` Ram Pai
2007-06-21 16:29 ` H. Peter Anvin
2007-06-21 16:29 ` H. Peter Anvin
2007-06-21 17:20 ` Ram Pai
2007-06-21 17:20 ` Ram Pai
2007-06-21 17:31 ` H. Peter Anvin
2007-06-21 17:31 ` H. Peter Anvin
2007-06-21 17:43 ` H. Peter Anvin
2007-06-21 17:43 ` H. Peter Anvin
2007-06-22 6:44 ` Ram Pai
2007-06-22 7:06 ` H. Peter Anvin
2007-06-22 7:06 ` H. Peter Anvin
2007-06-22 7:34 ` Ram Pai
2007-06-22 7:51 ` H. Peter Anvin
[not found] ` <20070625214640.GC29058@ram.us.ibm.com>
2007-06-25 22:00 ` [RFC PATCH 1/1] VFS: Augment /proc/mount with subroot and shared-subtree Ram Pai
2007-06-26 8:01 ` Karel Zak
2007-06-26 8:01 ` Karel Zak
2007-06-26 14:34 ` H. Peter Anvin
2007-06-30 9:44 ` Christoph Hellwig
2007-06-30 12:56 ` H. Peter Anvin
2007-07-11 10:24 ` Christoph Hellwig
2007-07-11 10:24 ` Christoph Hellwig
2007-07-11 15:42 ` Ram Pai
2007-07-16 18:46 ` [RFC2 " Ram Pai
2007-07-16 18:46 ` Ram Pai
2007-06-20 22:24 ` Adding subroot information to /proc/mounts, or obtaining that through other means Karel Zak
2007-06-20 22:24 ` Karel Zak
2007-06-20 22:39 ` H. Peter Anvin
2007-06-20 22:39 ` H. Peter Anvin
2007-06-20 22:33 ` Chuck Lever
2007-06-20 22:41 ` H. Peter Anvin
2007-06-20 22:41 ` H. Peter Anvin
2007-06-20 22:48 ` Chuck Lever
2007-06-20 22:48 ` Chuck Lever
2007-06-20 22:57 ` H. Peter Anvin
2007-06-20 23:02 ` Chuck Lever
2007-06-20 23:02 ` Chuck Lever
2007-06-21 16:13 ` H. Peter Anvin [this message]
2007-06-21 16:13 ` H. Peter Anvin
2007-06-21 16:49 ` Serge E. Hallyn
2007-06-21 16:51 ` H. Peter Anvin
2007-06-21 16:51 ` H. Peter Anvin
2007-06-28 14:53 ` Pavel Machek
2007-06-28 15:36 ` H. Peter Anvin
2007-06-28 15:36 ` H. Peter Anvin
2007-06-20 22:05 ` Karel Zak
2007-06-20 22:05 ` Karel Zak
2007-06-20 22:07 ` H. Peter Anvin
2007-06-20 22:41 ` Dr. David Alan Gilbert
2007-06-20 22:41 ` Dr. David Alan Gilbert
2007-06-20 22:46 ` H. Peter Anvin
2007-06-20 22:46 ` H. Peter Anvin
2007-06-21 19:14 ` Hans-Peter Jansen
2007-06-21 19:14 ` Hans-Peter Jansen
2007-06-21 19:19 ` H. Peter Anvin
2007-06-21 19:19 ` H. Peter Anvin
2007-06-20 22:55 ` Nix
2007-06-21 10:45 ` Miklos Szeredi
2007-06-21 19:42 ` Nix
2007-06-21 19:42 ` Nix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=467AA3B4.6090609@zytor.com \
--to=hpa@zytor.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=util-linux-ng@vger.kernel.org \
--cc=viro@ftp.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.