Re: -CURRENT does not recognize standard mount options

From: Craig Rodrigues <rodrigc_at_crodrigues.org>
Date: Wed, 31 May 2006 11:44:39 -0400
On Tue, May 30, 2006 at 12:30:07PM -0400, Joe Marcus Clarke wrote:
> Should its kernel backend not support all of those options as well?  Or
> perhaps global_opts in vfs_mount.c should be updated to support all

Can you try this patch?  I'm not sure if "force" and "sync"
should be global_opts or not because I don't know
if they make sense for every FS, but for symmetry with what was
in mount_msdosfs before, we can push them into the filesystem code for msdosfs.
These inconsistencies between the various mount programs and
the various filesystem code is why I've been trying to push
towards using a single mount binary, and pushing the mount option
parsing into vfs_mount.c and the code for the specific filesystem.
We are not quite there yet, but we are a lot closer.


> MNT_STDOPTS options since mntopts.h says that these are options all
> mounts can understand?  Thanks for the follow up.

The problem is that comments like that were written with a UFS-centric
view.  It may not necessarily be true that the various filesystems
support all the "STD" mount options.  However, if you see
something that you think should work, let me know and we can
add it to global_opts if it is obvious that it should work for all filesystems,
or to the option code for a specific filesystem like msdosfs if the
mount option only works on specific filesystems.





Index: sys/fs/msdosfs/msdosfs_vfsops.c
===================================================================
RCS file: /home/ncvs/src/sys/fs/msdosfs/msdosfs_vfsops.c,v
retrieving revision 1.150
diff -u -u -r1.150 msdosfs_vfsops.c
--- sys/fs/msdosfs/msdosfs_vfsops.c	26 May 2006 00:32:20 -0000	1.150
+++ sys/fs/msdosfs/msdosfs_vfsops.c	31 May 2006 15:29:51 -0000
_at__at_ -79,7 +79,7 _at__at_
 /* List of mount options we support */
 static const char *msdosfs_opts[] = {
 	"from",
-	"export",
+	"export", "force", "sync",
 	"uid", "gid", "mask", "dirmask",
 	"shortname", "shortnames", "longname", "longnames", "nowin95", "win95",
 	"kiconv", "cs_win", "cs_dos", "cs_local",
Index: sbin/mount_msdosfs/mount_msdosfs.c
===================================================================
RCS file: /home/ncvs/src/sbin/mount_msdosfs/mount_msdosfs.c,v
retrieving revision 1.41
diff -u -u -r1.41 mount_msdosfs.c
--- sbin/mount_msdosfs/mount_msdosfs.c	1 Dec 2005 00:18:48 -0000	1.41
+++ sbin/mount_msdosfs/mount_msdosfs.c	31 May 2006 15:30:00 -0000
_at__at_ -59,9 +59,6 _at__at_
 
 static struct mntopt mopts[] = {
 	MOPT_STDOPTS,
-	MOPT_FORCE,
-	MOPT_SYNC,
-	MOPT_UPDATE,
 	MOPT_END
 };
 
-- 
Craig Rodrigues        
rodrigc_at_crodrigues.org
Received on Wed May 31 2006 - 13:44:44 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:56 UTC