Re: -CURRENT does not recognize standard mount options

From: Joe Marcus Clarke <marcus_at_FreeBSD.org>
Date: Tue, 30 May 2006 12:30:07 -0400
On Tue, 2006-05-30 at 12:04 -0400, Craig Rodrigues wrote:
> On Tue, May 30, 2006 at 12:08:01AM -0400, Joe Marcus Clarke wrote:
> > I'm trying to mount a USB stick with an MS-DOS file system on it, and
> > I'm specifying -o sync.  This mount works in RELENG_6, and the source
> > for mount_msdosfs.c makes me think it should work in -CURRENT.  However,
> > this is what I see:
> > 
> > # mount_msdosfs -o sync /dev/da1s1 /mnt
> > mount_msdosfs: /dev/da1s1: Invalid argument
> 
> Just because you could do this in RELENG_6,
> did -o sync actually ever work in msdosfs?

That I'm not sure of.  I am trying to come up with a set of common mount
options for auto-mounting in HAL.  What worked in RELENG_6 does not work
in -CURRENT, so I want to make sure I have a good intersection of
supported options.

> 
> There were a lot of inconsistencies in the old parsing of mount options,
> where UFS specific mount options would just happen to "work", i.e.
> "not fail" for other filesystems.
> 
> Anyways, you can try this patch:

This patch will definitely work for sync (though maybe sync should be
moved to msdosfs_opts in msdosfs_vfsops.c).  What I'm also seeing is
options like atime are also not supported.  My real question was since
mount_msdosfs.c says this:

static struct mntopt mopts[] = {
        MOPT_STDOPTS,
        MOPT_FORCE,
        MOPT_SYNC,
        MOPT_UPDATE,
        MOPT_END
};


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
MNT_STDOPTS options since mntopts.h says that these are options all
mounts can understand?  Thanks for the follow up.

Joe

> 
> 
> Index: vfs_mount.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/kern/vfs_mount.c,v
> retrieving revision 1.225
> diff -u -u -r1.225 vfs_mount.c
> --- vfs_mount.c	26 May 2006 02:38:48 -0000	1.225
> +++ vfs_mount.c	30 May 2006 15:59:30 -0000
> _at__at_ -139,6 +139,7 _at__at_
>  	"suid",
>  	"exec",
>  	"update",
> +	"sync",
>  	NULL
>  };
>  
> 
-- 
Joe Marcus Clarke
FreeBSD GNOME Team      ::      gnome_at_FreeBSD.org
FreeNode / #freebsd-gnome
http://www.FreeBSD.org/gnome

Received on Tue May 30 2006 - 14:30:47 UTC

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