Re: request for patches: showing mount options

Chuck Lever
2007-07-30T15:24:06Z

[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]

Miklos Szeredi wrote:
>>>> Some mount options are never passed to the kernel, and thus can't appear
>>>> in /proc/mounts. Examples include user, users, and _netdev for NFS.
>>> These options control *who* may mount and *when* to mount. They are
>>> not a property of the mount itself and are not added to /etc/mtab.
>>>
>>> There's a "user=ID" option that is added to /etc/mtab in case of user
>>> mounts. This identifies the owner of the mount, so that it can be
>>> unmounted by that user. There are patches in -mm that enable the
>>> kernel to store this info.
>>>
>>> Do you have other examples in mind?

There are a few more cases for NFS mount.

After a successful mount, the NFS mount command tucks some options into
/etc/mtab that reflect which mountd was used for the mount, and what
protocol version and port was used for the mount request. Those options
are not passed to the kernel, and do not appear in /proc/mounts today.
See nfs(5)'s discussion of the mountport, mounthost, mountprog, and
mountvers options.

However, the trend for NFS is to push mount option parsing into the
kernel. Thus all options will be passed to the kernel, and at that
point it should be able to reflect the mount* options in /proc/mounts.
But it doesn't do that quite yet.

I'm wondering if there are other such cases in other file systems.

[-- Attachment #2: chuck.lever.vcf --]
[-- Type: text/x-vcard, Size: 290 bytes --]

begin:vcard
fn:Chuck Lever
n:Lever;Chuck
org:Oracle Corporation;Corporate Architecture: Linux Projects Group
adr:;;1015 Granger Avenue;Ann Arbor;MI;48104;USA
title:Principal Member of Staff
tel;work:+1 248 614 5091
x-mozilla-html:FALSE
url:http://oss.oracle.com/~cel
version:2.1
end:vcard