Re: /etc/mtab and per-process namespaces
From: Michael Tokarev (mjt_at_tls.msk.ru)
Date: 10/04/05
- Previous message: Dipankar Sarma: "Re: dentry_cache using up all my zone normal memory -- also seen on 2.6.14-rc2"
- In reply to: Christoph Hellwig: "Re: /etc/mtab and per-process namespaces"
- Next in thread: David Leimbach: "Re: /etc/mtab and per-process namespaces"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 04 Oct 2005 23:49:05 +0400 To: Christoph Hellwig <hch@infradead.org>
Christoph Hellwig 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.
Well, it's uptodate, but it isn't the same as mtab. Like:
/tmp/test on /mnt/test type ext2 (rw,loop=/dev/loop/0)
(mtab), vs
/dev/loop/0 /mnt/test ext2 rw 0 0
or:
tmpfs on /dev type tmpfs (rw,size=10M,mode=0755)
vs
tmpfs /dev tmpfs rw 0 0
ie, sometimes, mtab format is more useful. Also, with the
above example with loop device, umount is able to delete the
loop device for loop-mounts.
Another funky example:
losetup /dev/loop/0 /tmp/test
cd /dev/loop
mount 0 /mnt/test
now, mtab shows:
/dev/loop/0 /mnt/test ext2 rw 0 0
while /proc/mounts shows
0 /mnt/test ext2 rw 0 0
which is rather useless.
/mjt
-
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/
- Previous message: Dipankar Sarma: "Re: dentry_cache using up all my zone normal memory -- also seen on 2.6.14-rc2"
- In reply to: Christoph Hellwig: "Re: /etc/mtab and per-process namespaces"
- Next in thread: David Leimbach: "Re: /etc/mtab and per-process namespaces"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|