Re: /etc/mtab and per-process namespaces

From: David Leimbach
Date: Tue Oct 04 2005 - 14:53:04 EST


On 10/4/05, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> I suspect not one cares about /etc/mtab. It's a pretty horrible
> interface. Use /proc/self/mounts if your care about the mount table
> for your current namespace, it's guranteed uptodate.
>
>

Hmmm that works pretty well, but it's lacking in some ways.

/dev/hdc3 /root/slash reiserfs rw 0 0
/dev/hdc3 /home/dave/blah resierfs rw 0 0

The above is not very descriptive.

/etc/mtab has:
/ /root/slash none rw,bind 0 0
/home/dave/public_html /home/dave/blah none rw,bind 0 0

Which tells me more about what I care about for 'bind' mounts.

However it does violate the "privacy" of the namespace by telling
everyone on the system how I have my stuff mounted :).

/proc/self/mounts does a much better job respecting this privacy but
doesn't give the information I really care about.

I think I'm looking for something like "ns" on Plan 9 or Inferno that
dumps out how my current namespace is constructed. Each process with
a private namespace should get different results for "ns".

Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/