public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ram Pai <linuxram@us.ibm.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Al Viro <viro@ftp.linux.org.uk>,
	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: Fri, 22 Jun 2007 00:34:50 -0700	[thread overview]
Message-ID: <1182497690.2812.54.camel@ram.us.ibm.com> (raw)
In-Reply-To: <467B7509.8010106@zytor.com>

On Fri, 2007-06-22 at 00:06 -0700, H. Peter Anvin wrote:
> Ram Pai wrote:
> > 
> > the second patch made a /proc/propagation interface which had almost the
> > same fields, but also added fields to show the propagation type of the
> > mount as well as pointers to its peers and master depending on the type
> > of the mount. 
> > 
> > I think the consensus seems to have a new interface /proc/make-a-name
> > which extends the interface provided by /proc/mounts but provides the
> > propagation state of the mounts too as well as disambiguate bind mounts.
> > Which makes sense.
> > 
> 
> Why?  It seems a lot cleaner to have all the information in the same
> place.  It is highly unfriendly to userspace to have to gather
> information in a lot of places, plus it adds race conditions.
> 
> It would be another matter if the format that we have now couldn't be
> extended, but we need those fields (well, except the two zeros, but who
> cares) *anyway*, so we might as well stick to the existing file, and
> reduce the total amount of code and clutter.

Ok. so you think /proc/mounts can be extended easily without breaking
any userspace commands?

well lets see..
1. to disambiguate bind mounts, we have to add a field that displays the
	 path to the mount's root dentry from the filesystem's root
	 dentry. Agree?

2. For filesystems that do not have a backing store, it becomes hard
	to disambiguate bind mounts in (1). So we need to add a
	filesystem-id field.

3. if we need to add the propagation status of the mount we need a
	 propagation flag added in the output.

4. To be able to construct the propagation tree, we need a way to refer
	to the other mounts, since some mounts are peers and some other
	mounts are master. Which means we need a mount-id field.
	Agree?

If you agree to the above 4 new fields, it becomes challenging to
extend /proc/mounts to incorporate these new fields without
breaking any existing applications. 


> > 
> > BTW: what is the need for overmounted flag?  Do you mean two vfsmounts
> > mounted on the same dentry on the ***same vfsmount*** ?
> > 
> 
> Maybe I'm not following the uses of your flags well enough to figure out
>  if that information can already been deduced.

With the addition of the above 4 mentioned fields, I think one should be
easily able to decipher which mnt-id is mounted on which mnt-id. no?
maybe not. Well we will have to extend the mountpoint field to indicate
the mnt-id in which the mountpoint resides.  

RP

> 
> 	-hpa


  reply	other threads:[~2007-06-22  7:37 UTC|newest]

Thread overview: 41+ 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 21:03 ` Al Viro
2007-06-20 21:20   ` H. Peter Anvin
2007-06-21 16:20     ` Ram Pai
2007-06-21 16:29       ` H. Peter Anvin
2007-06-21 17:20         ` Ram Pai
2007-06-21 17:31       ` 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:34             ` Ram Pai [this message]
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 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 15:42                           ` Ram Pai
2007-07-16 18:46                   ` [RFC2 " 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:39     ` H. Peter Anvin
2007-06-20 22:33   ` Chuck Lever
2007-06-20 22:41     ` H. Peter Anvin
2007-06-20 22:48       ` Chuck Lever
2007-06-20 22:57         ` H. Peter Anvin
2007-06-20 23:02           ` Chuck Lever
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-28 14:53   ` Pavel Machek
2007-06-28 15:36     ` H. Peter Anvin
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:46     ` H. Peter Anvin
2007-06-21 19:14       ` Hans-Peter Jansen
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

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=1182497690.2812.54.camel@ram.us.ibm.com \
    --to=linuxram@us.ibm.com \
    --cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox