On Fri, 11 Apr 2008 16:28:43 -0400
Chuck Lever <[email protected]> wrote:
> To provide compatibility with automounters who use a common set of mount
> options for all file systems, change the NFS in-kernel mount option parser
> to ignore mount options it doesn't recognize.
> Signed-off-by: Chuck Lever <[email protected]>
> Take 2.
> fs/nfs/super.c | 7 ++-----
> 1 files changed, 2 insertions(+), 5 deletions(-)
> diff --git a/fs/nfs/super.c b/fs/nfs/super.c
> index f921902..cbf2b37 100644
> --- a/fs/nfs/super.c
> +++ b/fs/nfs/super.c
> @@ -1044,7 +1044,8 @@ static int nfs_parse_mount_options(char *raw,
> - goto out_unknown;
> + dfprintk(MOUNT, "NFS: unrecognized mount option '%s'"
> + " ignored\n", p);
> @@ -1070,10 +1071,6 @@ out_unrec_xprt:
> printk(KERN_INFO "NFS: unrecognized security flavor\n");
> return 0;
> - printk(KERN_INFO "NFS: unknown mount option: %s\n", p);
> - return 0;
Sorry for late reply on this...
I wonder if we should make this conditional on the "-s" (sloppy)
option? I think autofs will use that option when it mounts. There are a
couple of ways we could approach this:
1) have -s set a mount flag (which means getting a new MS_SLOPPY flag
added to the VFS).
2) have -s make mount.nfs prepend an implicit "sloppy," to the option
string. That would get parsed first and you could make the behavior of
unrecognized mount options be dependent upon that.
#2 sounds fairly easy to do, actually...
Jeff Layton <[email protected]>