xfs-masters
[Top] [All Lists]

[xfs-masters] Re: request for patches: showing mount options

To: "Miklos Szeredi" <miklos@xxxxxxxxxx>
Subject: [xfs-masters] Re: request for patches: showing mount options
From: "Steve French" <smfrench@xxxxxxxxx>
Date: Fri, 27 Jul 2007 09:10:21 -0500
Cc: linux-fsdevel@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx, kzak@xxxxxxxxxx, ericvh@xxxxxxxxx, lucho@xxxxxxxxxx, zippel@xxxxxxxxxxxxxx, hpa@xxxxxxxxx, raven@xxxxxxxxxx, rathamahata@xxxxxxx, dhowells@xxxxxxxxxx, sfrench@xxxxxxxxx, mhalcrow@xxxxxxxxxx, phillip@xxxxxxxxxxxxxxxxxxxx, hirofumi@xxxxxxxxxxxxxxxxxx, mikulas@xxxxxxxxxxxxxxxxxxxxxxxx, wli@xxxxxxxxxxxxxx, shaggy@xxxxxxxxxxxxxx, vandrove@xxxxxxxxxx, trond.myklebust@xxxxxxxxxx, aia21@xxxxxxxxxx, mark.fasheh@xxxxxxxxxx, kurt.hackel@xxxxxxxxxx, reiserfs-devel@xxxxxxxxxxxxxxx, bfennema@xxxxxxxxxxxxxxxxxxxxxx, dushistov@xxxxxxx, xfs-masters@xxxxxxxxxxx, arnd@xxxxxxxx, holzheu@xxxxxxxxxx
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jq3+xEV4lzeZCFrA7LNXz6UUv9MAa5R3Dvo0Sbcf1FNTxn2FjSBGBCbYvYMQ6q8oKGostv/Li3UiPNUgnpF/zHy0NHFdKRuq6HR8LQ8+/F7gJNNeOAqQXcO8kBl+59lQpOofCILgeUdxyYXgAiordTdBgY9twc8S2owEcv2juuo=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=tRctE8+5BDqrdQDpIigAa5jABjqYOK65c19XYuRRoT2HDyqDSeX8NpyhEa0vLf/fYN/Y0LhT/iJxWDejhreu9Qtu3lLoEUulN5WzhRUxB+OCQ95q1v0DKXecB6ZAvvANI7Hm32G9JVyBcJIKBNZv+glQBtBynxnJPY6XGcO23GE=
In-reply-to: <E1IEQ7q-0000qE-00@xxxxxxxxxxxxxxxxxxxxxx>
References: <E1IEQ7q-0000qE-00@xxxxxxxxxxxxxxxxxxxxxx>
Reply-to: xfs-masters@xxxxxxxxxxx
Sender: xfs-masters-bounce@xxxxxxxxxxx
What do you consider the best example so far of a kernel module's
equivalent of "parse_mount_options" (handling a mix of options of
different types) and show_options.

On 7/27/07, Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
> [please consider pruning the CC list if discussing some aspect, which
> doesn't concern all]
>
> I've done an audit of all filesystems with regards to showing mount
> options in /proc/<pid>/mounts.  Unfortunately most of them show none
> or only a part of all accepted options (for details see list of
> filesystems at the end of the mail).
>
> This is currently not a big problem, because mount(8) stores the given
> options in /etc/mtab.  However we want to get rid of mtab, and this
> requires, that the option showing be fixed up.
>
> It would be easiest if this was done by the VFS instead of having to
> deal with it in filesystems.  However there are differences in how
> filesytems handle options during mount and remount, and it would be
> impossible to take this into account in all cases.
>
> If you are CC-ed, and responsible for one of these filesystems, please
> take a moment to fully implement the ->show_options() method.  In most
> cases it should be an easy task.
>
> If for some reason you are unable to do this, please let me know and
> I'll fix it up.
>
> Here are some guidelines for showing options.  I'll also add these to
> Documentation/filesystems/vfs.txt
>
> +   If a filesystem accepts mount options, it must define show_options()
> +   to show all the currently active options.  The rules are:
> +
> +     - options MUST be shown which are not default or their values differ
> +       from the default
> +
> +     - options MAY be shown which are enabled by default or have their
> +       default value
> +
> +   Options used only internally between a mount helper and the kernel
> +   (such as file descriptors), or which only have an effect during the
> +   mounting (such as ones controlling the creation of a journal) are exempt
> +   from the above rules.
>
> Thanks,
> Miklos
>
> -------
> legend:
>
>   all - fs has options, but doesn't define ->show_options()
>   some - fs defines ->show_options(), but some options are not shown
>   noopt - fs does not have options
>   good - fs shows all options
>   patch - I have a patch
>
>
> 9p          some
> adfs        all (maintainer?)
> affs        all
> afs         all
> autofs      all
> autofs4     some
> befs        all
> bfs         noopt
> cifs        some (odd parser)
> coda        noopt
> configfs    noopt
> cramfs      noopt
> debugfs     noopt
> devpts      patch
> ecryptfs    some
> efs         noopt
> ext2        patch
> ext3        patch
> ext4        patch
> fat         some
> freevxfs    noopt
> fuse        patch
> gfs2        good
> hfs         good
> hfsplus     good
> hostfs      patch
> hpfs        all
> hppfs       noopt
> hugetlbfs   all
> isofs       all (maintainer?)
> jffs2       noopt
> jfs         some
> minix       noopt
> msdos       ->fat
> ncpfs       all (FS_BINARY_MOUNTDATA?)
> nfs         some
> nfsd        noopt
> ntfs        good (odd parser)
> ocfs2       all
> openpromfs  noopt
> proc        noopt
> qnx4        noopt
> ramfs       noopt
> reiserfs    all
> romfs       noopt
> smbfs       good (odd parser) (maintainer?)
> sysfs       noopt
> sysv        noopt
> udf         all
> ufs         all
> vfat        ->fat
> xfs         some (odd parser)
>
> mm/shmem.c                                    patch
> drivers/oprofile/oprofilefs.c                 noopt
> drivers/infiniband/hw/ipath/ipath_fs.c        noopt
> drivers/misc/ibmasm/ibmasmfs.c                noopt
> drivers/usb/core (usbfs)                      noopt
> drivers/usb/gadget (gadgetfs)                 noopt
> drivers/isdn/capi/capifs.c                    noopt
> kernel/cpuset.c                               noopt
> fs/binfmt_misc.c                              noopt
> net/sunrpc/rpc_pipe.c                         noopt
> arch/powerpc/platforms/cell/spufs             all
> arch/s390/hypfs                               all
> ipc/mqueue.c                                  noopt
> security (securityfs)                         noopt
> security/selinux/selinuxfs.c                  noopt
>
> in -mm:
>
> reiser4                some (odd parser)
> kernel/container.c     good (odd parser)
>


-- 
Thanks,

Steve


<Prev in Thread] Current Thread [Next in Thread>