Skip to contentSkip to conversation

NFS: Support NFSv4 with the "nfs" file system type

PATCH New Chuck Lever 1 participant 1 message Aug 28, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFS: Support NFSv4 with the "nfs" file system type

Completely untested -- for discussion only.

When mounting an "nfs" type file system, recognize "v4," "vers=4," or "nfsvers=4" mount options, and send NFSv4 requests on the wire. The file system type remains an "nfs" file system after the mount(2) call succeeds, and the "nfs4" file system is still fully supported and unchanged.

This could be cleaner, and there are still a lot of little details to work out.

---

Trond-

Was this what you were thinking?

 fs/nfs/internal.h    |    1 
 fs/nfs/super.c       |  115 +++++++++++++++++++++++++++++++++++++++++++-------
 include/linux/nfs4.h |    1 
 3 files changed, 102 insertions(+), 15 deletions(-)
fs/nfs/internal.h +1 -0
index dabf345..8d42432 100644
@@ -63,6 +63,7 @@ struct nfs_parsed_mount_data {
 	unsigned int		auth_flavor_len;
 	rpc_authflavor_t	auth_flavors[1];
 	char			*client_address;
+	unsigned int		version;
 	unsigned int		minorversion;
 	char			*fscache_uniq;
 
fs/nfs/super.c +100 -15

175 lines not on this page · raw message

include/linux/nfs4.h +1 -0
index bd2eba5..33b2836 100644
@@ -472,6 +472,7 @@ enum lock_type4 {
 
 #define NFSPROC4_NULL 0
 #define NFSPROC4_COMPOUND 1
+#define NFS4_VERSION 4
 #define NFS4_MINOR_VERSION 0
 
 #if defined(CONFIG_NFS_V4_1)