NFS: add mount options 'v4.0' and 'v4.1'

Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Weston Andros Adamson 2012-02-07 11:49:11 -05:00 committed by Trond Myklebust
parent b6d1e83b4e
commit 7ced286e0a
1 changed files with 13 additions and 1 deletions

View File

@ -80,7 +80,7 @@ enum {
Opt_cto, Opt_nocto, Opt_cto, Opt_nocto,
Opt_ac, Opt_noac, Opt_ac, Opt_noac,
Opt_lock, Opt_nolock, Opt_lock, Opt_nolock,
Opt_v2, Opt_v3, Opt_v4, Opt_v2, Opt_v3, Opt_v4, Opt_v4_0, Opt_v4_1,
Opt_udp, Opt_tcp, Opt_rdma, Opt_udp, Opt_tcp, Opt_rdma,
Opt_acl, Opt_noacl, Opt_acl, Opt_noacl,
Opt_rdirplus, Opt_nordirplus, Opt_rdirplus, Opt_nordirplus,
@ -136,6 +136,8 @@ static const match_table_t nfs_mount_option_tokens = {
{ Opt_v2, "v2" }, { Opt_v2, "v2" },
{ Opt_v3, "v3" }, { Opt_v3, "v3" },
{ Opt_v4, "v4" }, { Opt_v4, "v4" },
{ Opt_v4_0, "v4.0" },
{ Opt_v4_1, "v4.1" },
{ Opt_udp, "udp" }, { Opt_udp, "udp" },
{ Opt_tcp, "tcp" }, { Opt_tcp, "tcp" },
{ Opt_rdma, "rdma" }, { Opt_rdma, "rdma" },
@ -1172,6 +1174,16 @@ static int nfs_parse_mount_options(char *raw,
mnt->flags &= ~NFS_MOUNT_VER3; mnt->flags &= ~NFS_MOUNT_VER3;
mnt->version = 4; mnt->version = 4;
break; break;
case Opt_v4_0:
mnt->flags &= ~NFS_MOUNT_VER3;
mnt->version = 4;
mnt->minorversion = 0;
break;
case Opt_v4_1:
mnt->flags &= ~NFS_MOUNT_VER3;
mnt->version = 4;
mnt->minorversion = 1;
break;
case Opt_udp: case Opt_udp:
mnt->flags &= ~NFS_MOUNT_TCP; mnt->flags &= ~NFS_MOUNT_TCP;
mnt->nfs_server.protocol = XPRT_TRANSPORT_UDP; mnt->nfs_server.protocol = XPRT_TRANSPORT_UDP;