Skip to contentSkip to conversation

A basic NFSv4 client for 2.5.x

PATCH New Trond Myklebust 1 participant 1 message Oct 14, 2002

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

PATCH 19/19 A basic NFSv4 client for 2.5.x

Now that all the hooks are in place, this large patch imports all of the new code for the NFSv4 client.

  nfs4proc.c   - procedure vectors
  nfs4xdr.c    - XDR
  nfs4state.c  - state bookkeeping (very minimal for now)

nfs4renewd.c - a daemon (implemented as an rpc_task) to keep
state from expiring on the server

Note: The RPCSEC_GSS authentication code is not yet included here.
For the moment we make do with AUTH_UNIX aka. AUTH_SYS.

Neither is the code to do upcalls to userland in order to do uid/gid <-> name mappings. Instead, stubs have been added to translate everything to 'nobody:nobody' == '-2:-2'

fs/nfs/file.c +6 -0
diff -u --recursive --new-file linux-2.5.42-nfsv4-E03/fs/nfs/file.c linux-2.5.42-nfsv4-E04/fs/nfs/file.c
@@ -259,6 +259,12 @@
 	if (!inode)
 		return -EINVAL;
 
+	/* This will be in a forthcoming patch. */
+	if (NFS_PROTO(inode)->version == 4) {
+		printk(KERN_INFO "NFS: file locking over NFSv4 is not yet supported\n");
+		return -EIO;
+	}
+
 	/* No mandatory locks over NFS */
 	if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
 		return -ENOLCK;
fs/nfs/inode.c +6 -1
diff -u --recursive --new-file linux-2.5.42-nfsv4-E03/fs/nfs/inode.c linux-2.5.42-nfsv4-E04/fs/nfs/inode.c
@@ -77,8 +77,13 @@
 	NULL,
 	NULL,
 	&nfs_version2,
-#ifdef CONFIG_NFS_V3
+#if defined(CONFIG_NFS_V3)
 	&nfs_version3,
+#elif defined(CONFIG_NFS_V4)
+	NULL,
+#endif
+#if defined(CONFIG_NFS_V4)
+	&nfs_version4,
 #endif
 };
 
fs/nfs/Makefile +1 -0
diff -u --recursive --new-file linux-2.5.42-nfsv4-E03/fs/nfs/Makefile linux-2.5.42-nfsv4-E04/fs/nfs/Makefile
@@ -8,6 +8,7 @@
 			   proc.o read.o symlink.o unlink.o write.o
 nfs-$(CONFIG_ROOT_NFS)	+= nfsroot.o mount_clnt.o      
 nfs-$(CONFIG_NFS_V3)	+= nfs3proc.o nfs3xdr.o
+nfs-$(CONFIG_NFS_V4)	+= nfs4proc.o nfs4xdr.o nfs4state.o nfs4renewd.o
 nfs-$(CONFIG_NFS_DIRECTIO) += direct.o
 nfs-objs		:= $(nfs-y)
 
fs/nfs/nfs4proc.c +1577 -0

1,577 lines not on this page · raw message

fs/nfs/nfs4renewd.c +110 -0

110 lines not on this page · raw message

fs/nfs/nfs4state.c +81 -0

81 lines not on this page · raw message

fs/nfs/nfs4xdr.c +1777 -0

1,199 lines not on this page · raw message

include/linux/nfs_fs.h +19 -0
diff -u --recursive --new-file linux-2.5.42-nfsv4-E03/include/linux/nfs_fs.h linux-2.5.42-nfsv4-E04/include/linux/nfs_fs.h

Lines of this file are not shown. View the raw message.

include/linux/nfs_xdr.h +230 -4

234 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

Part of the diff is not shown here. View the raw message.