Re: OOM & [OT] util-linux-2.12e

CaT
2004-09-20T13:15:57Z

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.