NFS: add mount options 'v4.0' and 'v4.1'
Subsystems (2)
PATCH 1/1 NFS: add mount options 'v4.0' and 'v4.1'
---
Updated to add 'v4.0' as trond requested.
We'll talk about this change at connectathon.
This 'just works' with mount.nfs(8) -- v.* options are passed to the kernel with no modifications needed.
fs/nfs/super.c | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-)
fs/nfs/super.c +13 -1
@@ -80,7 +80,7 @@ enum { Opt_cto, Opt_nocto, Opt_ac, Opt_noac, 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_acl, Opt_noacl, Opt_rdirplus, Opt_nordirplus,
@@ -136,6 +136,8 @@ static const match_table_t nfs_mount_option_tokens = { { Opt_v2, "v2" }, { Opt_v3, "v3" }, { Opt_v4, "v4" }, + { Opt_v4_0, "v4.0" }, + { Opt_v4_1, "v4.1" }, { Opt_udp, "udp" }, { Opt_tcp, "tcp" }, { Opt_rdma, "rdma" },
@@ -1172,6 +1174,16 @@ static int nfs_parse_mount_options(char *raw, mnt->flags &= ~NFS_MOUNT_VER3 ; mnt->version =4 ;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: mnt->flags &= ~NFS_MOUNT_TCP ; mnt->nfs_server.protocol =XPRT_TRANSPORT_UDP ;
Signature · 1 line
1.7.4.4
Hi-
Quoted 8 lines · Weston Andros Adamson
Signed-off-by Weston Andros Adamson <[email protected]>---
Updated to add 'v4.0' as trond requested.We'll talk about this change at connectathon.
This 'just works' with
mount.nfs(8)-- v.* options are passed to the kernel with no modifications needed.
I'm more concerned about version auto-negotation.
Quoted 50 lines
fs/nfs/super.c| 14 +++++++++++++-1 files changed, 13 insertions(+), 1 deletions(-)fs/nfs/super.c +13
-1@@ -80,7 +80,7 @@ enum { Opt_cto, Opt_nocto, Opt_ac, Opt_noac, 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_acl, Opt_noacl, Opt_rdirplus, Opt_nordirplus,@@ -136,6 +136,8 @@ static const match_table_t nfs_mount_option_tokens = { { Opt_v2, "v2" }, { Opt_v3, "v3" }, { Opt_v4, "v4" }, + { Opt_v4_0, "v4.0" }, + { Opt_v4_1, "v4.1" }, { Opt_udp, "udp" }, { Opt_tcp, "tcp" }, { Opt_rdma, "rdma" },@@ -1172,6 +1174,16 @@ static int nfs_parse_mount_options(char *raw, mnt->flags &= ~NFS_MOUNT_VER3 ; mnt->version =4 ;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: mnt->flags &= ~NFS_MOUNT_TCP ; mnt->nfs_server.protocol =XPRT_TRANSPORT_UDP ;Signature · 6 lines
1.7.4.4 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Chuck Lever chuck[dot]lever[at]oracle[dot]com
Quoted 5 lines · Chuck Lever
Hi-
Quoted 2 lines · Weston Andros Adamson
NFS: add mount options 'v4.0' and 'v4.1'
Good god thanks, that'll be nice.
Why did we have to suffer for 5 years without it? ;-)
Quoted 11 lines
Quoted 8 lines
Signed-off-by Weston Andros Adamson <[email protected]>---
Updated to add 'v4.0' as trond requested.We'll talk about this change at connectathon.
This 'just works' with
mount.nfs(8)-- v.* options are passed to the kernel with no modifications needed.I'm more concerned about version auto-negotation.
If we are at it can we also have a "this-version-only" option which disables "auto-negotation"
I know that's an hard one
OK we'll talk at CON12.
Thanks Andy
Boaz
Quoted 51 lines
Quoted 50 lines
fs/nfs/super.c| 14 +++++++++++++-1 files changed, 13 insertions(+), 1 deletions(-)fs/nfs/super.c +13
-1@@ -80,7 +80,7 @@ enum { Opt_cto, Opt_nocto, Opt_ac, Opt_noac, 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_acl, Opt_noacl, Opt_rdirplus, Opt_nordirplus,@@ -136,6 +136,8 @@ static const match_table_t nfs_mount_option_tokens = { { Opt_v2, "v2" }, { Opt_v3, "v3" }, { Opt_v4, "v4" }, + { Opt_v4_0, "v4.0" }, + { Opt_v4_1, "v4.1" }, { Opt_udp, "udp" }, { Opt_tcp, "tcp" }, { Opt_rdma, "rdma" },@@ -1172,6 +1174,16 @@ static int nfs_parse_mount_options(char *raw, mnt->flags &= ~NFS_MOUNT_VER3 ; mnt->version =4 ;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: mnt->flags &= ~NFS_MOUNT_TCP ; mnt->nfs_server.protocol =XPRT_TRANSPORT_UDP ;Signature · 6 lines
1.7.4.4 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 17 lines · Boaz Harrosh
Quoted 5 lines · Chuck Lever
Hi-
Quoted 2 lines · Weston Andros Adamson
NFS: add mount options 'v4.0' and 'v4.1'
Good god thanks, that'll be nice.
Why did we have to suffer for 5 years without it? ;-)
Quoted 6 lines
Quoted 6 lines
Signed-off-by Weston Andros Adamson <[email protected]>---
Updated to add 'v4.0' as trond requested.We'll talk about this change at connectathon.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
This 'just works' with
mount.nfs(8)-- v.* options are passed to the kernel with no modifications needed.I'm more concerned about version auto-negotation.
If we are at it can we also have a "this-version-only" option which disables "auto-negotation"
Trond seems to have a plan for this. I'll defer to him.
-dros
Quoted 60 lines
I know that's an hard one
OK we'll talk at CON12.
Thanks Andy
BoazQuoted 51 lines
Quoted 50 lines
fs/nfs/super.c| 14 +++++++++++++-1 files changed, 13 insertions(+), 1 deletions(-)fs/nfs/super.c +13
-1@@ -80,7 +80,7 @@ enum { Opt_cto, Opt_nocto, Opt_ac, Opt_noac, 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_acl, Opt_noacl, Opt_rdirplus, Opt_nordirplus,@@ -136,6 +136,8 @@ static const match_table_t nfs_mount_option_tokens = { { Opt_v2, "v2" }, { Opt_v3, "v3" }, { Opt_v4, "v4" }, + { Opt_v4_0, "v4.0" }, + { Opt_v4_1, "v4.1" }, { Opt_udp, "udp" }, { Opt_tcp, "tcp" }, { Opt_rdma, "rdma" },@@ -1172,6 +1174,16 @@ static int nfs_parse_mount_options(char *raw, mnt->flags &= ~NFS_MOUNT_VER3 ; mnt->version =4 ;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: mnt->flags &= ~NFS_MOUNT_TCP ; mnt->nfs_server.protocol =XPRT_TRANSPORT_UDP ;Signature · 6 lines
1.7.4.4 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
T24gVHVlLCAyMDEyLTAyLTA3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GhpcyBhdXRvLW5lZ290aWF0aW9uDQppbiBrZXJuZWwg c3BhY2UuIEFzIHdlJ3ZlIGxlYXJuZWQgd2l0aCBtYWpvciB2ZXJzaW9uIG5lZ290aWF0aW9uLCBp dCBjYW4NCmJlIG1vcmUgZmxleGlibGUgdG8ganVzdCB0ZWFjaCB0aGUgJ21vdW50JyBjb21tYW5k IHRvIGRvIHRoZSBhY3R1YWwNCnByb2JpbmcsIHNpbmNlIHRoYXQgYWxsb3dzIHRoZSB1c2VyIGJl dHRlciBjb250cm9sIG92ZXIgdGhlIHByb2Nlc3MgdmlhDQpnbG9iYWwgY29uZmlndXJhdGlvbiBm aWxlcy4uLg0KDQotLSANClRyb25kIE15a2xlYnVzdA0KTGludXggTkZTIGNsaWVudCBtYWludGFp bmVyDQoNCk5ldEFwcA0KVHJvbmQuTXlrbGVidXN0QG5ldGFwcC5jb20NCnd3dy5uZXRhcHAuY29t DQoNCg==
Quoted 11 lines · Trond
Quoted 9 lines · Trond Myklebust
That said, I see the 'vers=4' being reserved for auto-negotiation of minor version, and the 'vers=4.x' as requiring a specific minor version number.
The way auto-negotiation is supposed to work is laid out in RFC3530(-bis): the client attempts the largest minor version that it supports, and the server replies with an OK, or aMINOR_VERSION_MISMATCHdepending on whether it supports that minor version or not. If not, the client retries with the next largest minor version, .... rince, repeat until successful...
Quoted 6 lines
BTW: There is no reason why we should need to do this auto-negotiation in kernel space. As we've learned with major version negotiation, it can be more flexible to just teach the 'mount' command to do the actual probing, since that allows the user better control over the process via global configuration files...
+1
Its also much easier to debug and fix bugs... People are much more willing to take a mount command update than a kernel update...
steved.
Quoted 17 lines · Boaz Harrosh
Quoted 5 lines · Chuck Lever
Hi-
Quoted 2 lines · Weston Andros Adamson
NFS: add mount options 'v4.0' and 'v4.1'
Good god thanks, that'll be nice.
Why did we have to suffer for 5 years without it? ;-)
Quoted 6 lines
Quoted 6 lines
Signed-off-by Weston Andros Adamson <[email protected]>---
Updated to add 'v4.0' as trond requested.We'll talk about this change at connectathon.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
This 'just works' with
mount.nfs(8)-- v.* options are passed to the kernel with no modifications needed.I'm more concerned about version auto-negotation.
If we are at it can we also have a "this-version-only" option which disables "auto-negotation"
That's what "vers=" already does. If "vers=" is specified, the mount point uses that version, or the mount operation fails if the server or client doesn't support the requested version. There is no version negotiation when "vers=" is specified.
What did you have in mind?
Quoted 63 lines
I know that's an hard one
OK we'll talk at CON12.
Thanks Andy
BoazQuoted 46 lines
Quoted 46 lines
fs/nfs/super.c| 14 +++++++++++++-1 files changed, 13 insertions(+), 1 deletions(-)fs/nfs/super.c +13
-1@@ -80,7 +80,7 @@ enum { Opt_cto, Opt_nocto, Opt_ac, Opt_noac, 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_acl, Opt_noacl, Opt_rdirplus, Opt_nordirplus,@@ -136,6 +136,8 @@ static const match_table_t nfs_mount_option_tokens = { { Opt_v2, "v2" }, { Opt_v3, "v3" }, { Opt_v4, "v4" }, + { Opt_v4_0, "v4.0" }, + { Opt_v4_1, "v4.1" }, { Opt_udp, "udp" }, { Opt_tcp, "tcp" }, { Opt_rdma, "rdma" },@@ -1172,6 +1174,16 @@ static int nfs_parse_mount_options(char *raw, mnt->flags &= ~NFS_MOUNT_VER3 ; mnt->version =4 ;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: mnt->flags &= ~NFS_MOUNT_TCP ; mnt->nfs_server.protocol =XPRT_TRANSPORT_UDP ;Signature · 1 line
1.7.4.4Quoted 5 lines
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Chuck Lever chuck[dot]lever[at]oracle[dot]com
Quoted 7 lines · Chuck Lever
Quoted 2 lines
If we are at it can we also have a "this-version-only" option which disables "auto-negotation"
That's what "vers=" already does. If "vers=" is specified, the mount point uses that version, or the mount operation fails if the server or client doesn't support the requested version. There is no version negotiation when "vers=" is specified.
I didn't know that I thought vers=4 will also try 3 if not supported by Server
Quoted 3 lines
What did you have in mind?
You are right I was thinking about if 4.1 I do not want 4.0
Thanks
Boaz