On Fri, 16 Jun 2000, Alexander Viro wrote:
> On Fri, 16 Jun 2000, Erez Zadok wrote:
>
> > On a related note, since we do have /proc/mounts, and assuming that procfs
> > is pretty much necessary nowadays, are we going to get rid of /etc/mtab and
> > completely move all getmntent info into the kernel? I never liked the fact
> > that people doing mounts (such as automounters) have to ensure that they
> > correctly maintain a separate text file in /etc.
>
> I'm not sure that we need to keep it on procfs - especially with the
> union-mounts coming into the game.
>
...
> > Hmmm, maybe that's a question to the glibc folks. I guess as long as all
> > the necessary tools and libraries will use /proc/mounts if available, and
> > avoid using /etc/mtab, that'd be ok.
>
> How many programs actually need this getmntent(), in the first
> place?
>
while we are on the subject of obsoleting /etc/mtab in favour of
/proc/mounts (or enhanced version thereof), please keep in mind the
classical problem of "mount -o loop" stopping to work if you use
/proc/mounts. I think Andries Brouwer explained in the past why was that
the case but I can't remember the reason. The problem was that loopback
module's refcount will leak (up) when using /proc/mounts unless you
manually losetup -d appropriate number of times.
Regardsm
Tigran