Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-28 Thread Pavel Machek
Hi! ... 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,

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-28 Thread H. Peter Anvin
Pavel Machek wrote: Hi! ... 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

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-22 Thread Ram Pai
On Thu, 2007-06-21 at 10:31 -0700, H. Peter Anvin wrote: Ram Pai wrote: Peter, I am not working on it currently. But i am interested in getting it done. I have the seed set of patches which had Al Viro's ideas incorporated. Infact those patches were sent on lkml 2 months back. Shall we

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-22 Thread H. Peter Anvin
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

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-22 Thread Ram Pai
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

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-22 Thread H. Peter Anvin
Ram Pai wrote: 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?

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-21 Thread Miklos Szeredi
Right now it is actually impossible to conclusively determine a filesystem-relative path in the presence of bind (and possibly move) mounts. This is highly desirable to be able to do in contexts that involve non-Linux (or not-the-current-instance-of-Linux) accesses to the filesystem,

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-21 Thread H. Peter Anvin
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

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-21 Thread Ram Pai
On Wed, 2007-06-20 at 14:20 -0700, H. Peter Anvin wrote: 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

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-21 Thread H. Peter Anvin
Ram Pai wrote: Peter, I am not working on it currently. But i am interested in getting it done. I have the seed set of patches which had Al Viro's ideas incorporated. Infact those patches were sent on lkml 2 months back. Shall we start with those patches? Are these the unprivileged mount

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-21 Thread Serge E. Hallyn
Quoting H. Peter Anvin ([EMAIL PROTECTED]): 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

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-21 Thread H. Peter Anvin
Serge E. Hallyn wrote: Hmm, or do you actually mean that if i'd done mount --bind /tmp/a /tmp mount --bind /tmp/b /tmp mount --bind /tmp/c /tmp that you would want to see information about the first two mounts? Yes. Right now, you see all three without any reliable

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-21 Thread Ram Pai
On Thu, 2007-06-21 at 09:29 -0700, H. Peter Anvin wrote: Ram Pai wrote: Peter, I am not working on it currently. But i am interested in getting it done. I have the seed set of patches which had Al Viro's ideas incorporated. Infact those patches were sent on lkml 2 months back. Shall we

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-21 Thread H. Peter Anvin
H. Peter Anvin wrote: I guess I suggest a single comma-separated field with flags and optional :argument: private shared:peer slave:master unbindable overmounted Just realized: overmounted should presumably have a mount ID associated with it, too.

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-21 Thread H. Peter Anvin
Hans-Peter Jansen wrote: That's already handled just fine: bash-3.1$ mkdir /tmp/'Jag är: \ en liten mask' bash-3.1$ sudo mount -t tmpfs none '/tmp/Jag är: \ en liten mask'/ bash-3.1$ tail -1 /proc/mounts none /tmp/Jag\040är:\040\134\012en\040liten\040mask tmpfs rw 0 0 bash-3.1$ Hmm,

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-21 Thread Nix
On 21 Jun 2007, Miklos Szeredi said: I'm working on this actually. See this (and related patches) in -mm: http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.22-rc4/2.6.22-rc4-mm2/broken-out/unprivileged-mounts-add-user-mounts-to-the-kernel.patch This solves the user=

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-20 Thread Al Viro
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

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-20 Thread H. Peter Anvin
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

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-20 Thread Karel Zak
On Wed, Jun 20, 2007 at 01:57:33PM -0700, H. Peter Anvin wrote: We could add a field to /proc/mounts to add this information: /dev/md6 /export ext3 rw,data=ordered 0 0 / /dev/md6 /home/foo ext3 rw,data=ordered 0 0 /users/foo /dev/md6 /home/bar ext3 rw,data=ordered 0 0 /users/bar I prefer

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-20 Thread H. Peter Anvin
Karel Zak wrote: On Wed, Jun 20, 2007 at 01:57:33PM -0700, H. Peter Anvin wrote: We could add a field to /proc/mounts to add this information: /dev/md6 /export ext3 rw,data=ordered 0 0 / /dev/md6 /home/foo ext3 rw,data=ordered 0 0 /users/foo /dev/md6 /home/bar ext3 rw,data=ordered 0 0

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-20 Thread Chuck Lever
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

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-20 Thread H. Peter Anvin
Chuck Lever wrote: To support NFS client performance statistics, I recently added /proc/self/mountstats. That might be a place to add details about --move and --bind mounts without changing the format of /proc/mounts. I just looked at /proc/self/mountstats; it seems to have no more

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-20 Thread H. Peter Anvin
Dr. David Alan Gilbert wrote: What happens with the (sick) case of spaces in directory names? Also is it really nicely defined that there is no way to put a space in an option in any of the filesystems? I suppose someone particularly sick could have a device node in a directory with a

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-20 Thread Chuck Lever
H. Peter Anvin wrote: Chuck Lever wrote: To support NFS client performance statistics, I recently added /proc/self/mountstats. That might be a place to add details about --move and --bind mounts without changing the format of /proc/mounts. I just looked at /proc/self/mountstats; it seems to

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-20 Thread Nix
On 20 Jun 2007, H. Peter Anvin verbalised: Right now it is actually impossible to conclusively determine a filesystem-relative path in the presence of bind (and possibly move) mounts. This is highly desirable to be able to do in contexts that involve non-Linux (or

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-20 Thread H. Peter Anvin
Chuck Lever wrote: The advantage is that it doesn't have strong user space dependencies on its format like /proc/mounts does. If you have NFS mount points, you will see that it includes a great deal of additional information about each mount. OK, I see now: device raidtest:/export mounted

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-20 Thread Chuck Lever
H. Peter Anvin wrote: Chuck Lever wrote: The advantage is that it doesn't have strong user space dependencies on its format like /proc/mounts does. If you have NFS mount points, you will see that it includes a great deal of additional information about each mount. OK, I see now: device

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-20 Thread Dr. David Alan Gilbert
* Karel Zak ([EMAIL PROTECTED]) wrote: On Wed, Jun 20, 2007 at 01:57:33PM -0700, H. Peter Anvin wrote: snip ... 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