linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] obsoleting /etc/mtab
@ 2007-05-31 16:29 Miklos Szeredi
       [not found] ` <E1HtnWS-0007UV-00-VFwzv6uONVrxNFs70CDYszOMxtEWgIxa@public.gmane.org>
  2007-06-03 15:42 ` James Cloos
  0 siblings, 2 replies; 23+ messages in thread
From: Miklos Szeredi @ 2007-05-31 16:29 UTC (permalink / raw)
  To: util-linux-ng, linux-fsdevel

I started working on adding support for unprivileged mounts[1] to
util-linux.

The big obstacle seems to be the reliance on /etc/mtab, since that
won't be kept up-to-date after mount(2) or umount(2) calls by
unprivileged users.

It's not just mount(8) that reads /etc/mtab, but various other
utilities, for example df(1).  So the best solution would be if
/etc/mtab were a symlink to /proc/mounts, and the kernel would be the
authoritative source of information regarding mounts.

This works quite well already, but there are minor problems:

(1) user mounts ("user" or "users" option in /etc/fstab) currently
    need /etc/mtab to keep track of the owner

(2) lots of filesystems only present a few mount options (or none) in
    /proc/mounts

(1) can be solved with the new mount owner support in the unprivileged
mounts patchset.  Mount(8) would still have to detect at boot time if
this is available, and either create the symlink to /proc/mounts or if
MS_SETOWNER is not available, fall back to using /etc/mtab.

(2) needs work in the filesystems implicated.  I already have patches
for ext2, ext3, tmpfs, devpts and hostfs, and it would be nice if the
maintainers for others could help out.

It wouldn't even be fatal if some mount options were missing from
/proc/mounts.  Mount options in /etc/mtab have never been perfectly
accurate, especially after a remount, when they could get totally out
of sync with the options effective for the filesystem.

Can someone think of any other problem with getting rid of /etc/mtab?

Thanks,
Miklos

[1] http://lkml.org/lkml/2007/4/27/180

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2007-06-06 15:35 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-31 16:29 [RFC] obsoleting /etc/mtab Miklos Szeredi
     [not found] ` <E1HtnWS-0007UV-00-VFwzv6uONVrxNFs70CDYszOMxtEWgIxa@public.gmane.org>
2007-05-31 16:40   ` H. Peter Anvin
2007-05-31 16:59     ` Miklos Szeredi
     [not found]     ` <465EFA91.6070705-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2007-05-31 23:04       ` Karel Zak
2007-05-31 23:30         ` Trond Myklebust
     [not found]           ` <1180654235.7084.32.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2007-06-01  0:11             ` H. Peter Anvin
     [not found]               ` <465F643C.7090008-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2007-06-01  4:30                 ` Andreas Dilger
2007-06-01  7:35               ` Karel Zak
     [not found]                 ` <20070601073516.GJ5473-CxBs/XhZ2BtHjqfyn1fVYA@public.gmane.org>
2007-06-02 16:44                   ` Jan Engelhardt
2007-05-31 23:47       ` David Chinner
2007-05-31 22:44   ` Karel Zak
2007-06-01  7:03     ` Miklos Szeredi
     [not found]       ` <E1Hu1Ak-0000yV-00-VFwzv6uONVrxNFs70CDYszOMxtEWgIxa@public.gmane.org>
2007-06-01  8:33         ` Karel Zak
     [not found]           ` <20070601083309.GK5473-CxBs/XhZ2BtHjqfyn1fVYA@public.gmane.org>
2007-06-01  8:49             ` Christoph Hellwig
     [not found]               ` <20070601084905.GA1959-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2007-06-01  9:44                 ` Karel Zak
2007-06-01  9:53                   ` Miklos Szeredi
     [not found]                     ` <E1Hu3on-0001HT-00-VFwzv6uONVrxNFs70CDYszOMxtEWgIxa@public.gmane.org>
2007-06-01 10:50                       ` Karel Zak
     [not found]     ` <20070531224443.GH5473-CxBs/XhZ2BtHjqfyn1fVYA@public.gmane.org>
2007-06-01  8:36       ` Matthias Koenig
2007-06-02 13:15   ` Roman Zippel
2007-06-06 15:35   ` Ian Kent
2007-06-03 15:42 ` James Cloos
     [not found]   ` <m3myzh11t2.fsf-eUECQUGGJJCHAtaq1fIXeWD2FQJk+8+b@public.gmane.org>
2007-06-03 16:32     ` H. Peter Anvin
     [not found]       ` <4662ED39.4060107-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2007-06-03 19:38         ` James Cloos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).