lkml.org 
[lkml]   [2004]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: OOM & [OT] util-linux-2.12e
On Mon, Sep 20, 2004 at 12:23:30PM +0200, Roman Zippel wrote:
> > > then /etc/mtab can die. Comments? Better solutions?
> >
> > Andries, /etc/mtab is obsolete since the day when /proc/self/mounts was
> > introduced. So, kill it today from your mount binary! TODAY. ...
>
> How do you distinguish between manual and automatic loop device setup?
> How do you filter /proc/mounts for chroot environments?

My apologies if something like this is already in the source. Just
throwing out an idea to the wolves. ;)

From /proc/self/mounts I take it that that's meant to be a list of
mountpoints the requesting process sees. So... why not have instances
of mountlists. The default is what the kernel starts with and each
process inherits. The chroot creates a 2nd instance so that any
processes spawned from that one see the mountlist from that instance.

Each process would, obviously, inherit the mountlist instance from
its parent.

The hassle happens when you want to deal with the process that began
an instance dieing without taking its children out with it. One way
to deal with it would be to introduce a counter, but that would
require locking to keep it serialised.

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

\
 
 \ /
  Last update: 2005-03-22 14:06    [W:1.025 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site