[pnfs] CVS: nfsv4

Benny Halevy bhalevy at panasas.com
Wed Sep 6 16:14:39 EDT 2006


cvs diff attached
Benny

Benny Halevy (Panasas) wrote:

>CVSROOT:	/cvs
>Module name:	nfsv4
>Changes by:	bhalevy at citi.	2006/09/06 16:12:05
>
>Modified files:
>	cvs/pnfs/fs/nfsd: nfs4proc.c 
>	cvs/pnfs/include/linux: nfs.h 
>	cvs/pnfs/include/linux/nfsd: nfsd.h 
>
>Log message:
>rev error codes to http://nfsv4-editor.org/draft-06/nfs41_prot.x
>
>_______________________________________________
>pNFS mailing list
>pNFS at linux-nfs.org
>http://linux-nfs.org/cgi-bin/mailman/listinfo/pnfs
>  
>

-------------- next part --------------
Index: fs/nfsd/nfs4proc.c
===================================================================
RCS file: /cvs/nfsv4/cvs/pnfs/fs/nfsd/nfs4proc.c,v
retrieving revision 1.18
diff -u -r1.18 nfs4proc.c
--- fs/nfsd/nfs4proc.c	13 Jul 2006 17:18:41 -0000	1.18
+++ fs/nfsd/nfs4proc.c	6 Sep 2006 20:05:34 -0000
@@ -827,12 +827,16 @@
 		switch (status) {
 			case 0:
 				break;
-			case -ENOENT:
 			case -ENOMEM:
-				status = nfserr_layoutunavailable;
+			case -EAGAIN:
+			case -EINTR:
+				status = nfserr_layouttrylater;
+				break;
+			case -ENOENT:
+				status = nfserr_badlayout;
 				break;
 			default:
-				status = nfserr_nomatching_layouttype;
+				status = nfserr_layoutunavailable;
 		}
 		goto out;
 	}
Index: include/linux/nfs.h
===================================================================
RCS file: /cvs/nfsv4/cvs/pnfs/include/linux/nfs.h,v
retrieving revision 1.3
diff -u -r1.3 nfs.h
--- include/linux/nfs.h	17 May 2006 21:30:53 -0000	1.3
+++ include/linux/nfs.h	6 Sep 2006 20:05:34 -0000
@@ -112,14 +112,24 @@
 	NFSERR_FILE_OPEN = 10046,      /*       v4 */
 	NFSERR_ADMIN_REVOKED = 10047,  /*       v4 */
 	NFSERR_CB_PATH_DOWN = 10048,   /*       v4 */
-	NFSERR_REPLAY_ME = 10049,	/*       v4 */
-	NFSERR_UNKNOWN_LAYOUTTYPE = 10050,	/* v4.1 */
-	NFSERR_NOMATCHING_LAYOUTTYPE = 10051,	/* v4.1 */
-	NFSERR_BADLAYOUTTYPE = 10052,		/* v4.1 */
-	NFSERR_LAYOUTUNAVAILABLE = 10053,	/* v4.1 */
-	NFSERR_LAYOUTTRYLATER = 10054,		/* v4.1 */
-	NFSERR_RECALLCONFLICT = 10055,		/* v4.1 */
-	NFSERR_BADIOMODE = 10056,		/* v4.1 */
+	NFSERR_BADIOMODE = 10049,		/* v4.1 */
+	NFSERR_BADLAYOUT = 10050,		/* v4.1 */
+	NFSERR_BAD_SESSION_DIGEST = 10051,	/* v4.1 */
+	NFSERR_BADSESSION = 10052,		/* v4.1 */
+	NFSERR_BADSLOT = 10053,			/* v4.1 */
+	NFSERR_COMPLETE_ALREADY = 10054,	/* v4.1 */
+	NFSERR_CONN_NOT_BOUND_TO_SESSION = 10055,/* v4.1 */
+	NFSERR_DELEG_ALREADY_WANTED = 10056,	/* v4.1 */
+	NFSERR_DIRDELEG_UNAVAIL = 10057,	/* v4.1 */
+	NFSERR_LAYOUTTRYLATER = 10058,		/* v4.1 */
+	NFSERR_LAYOUTUNAVAILABLE = 10059,	/* v4.1 */
+	NFSERR_NOMATCHING_LAYOUT = 10060,	/* v4.1 */
+	NFSERR_RECALLCONFLICT = 10061,		/* v4.1 */
+	NFSERR_UNKNOWN_LAYOUTTYPE = 10062,	/* v4.1 */
+	NFSERR_SEQ_MISORDERED = 10063,		/* v4.1 */
+	NFSERR_SEQUENCE_POS = 10064,		/* v4.1 */
+
+	NFSERR_REPLAY_ME = 11001,	/* linux internal */
 };
 
 /* NFSv2 file types - beware, these are not the same in NFSv3 */
Index: include/linux/nfsd/nfsd.h
===================================================================
RCS file: /cvs/nfsv4/cvs/pnfs/include/linux/nfsd/nfsd.h,v
retrieving revision 1.7
diff -u -r1.7 nfsd.h
--- include/linux/nfsd/nfsd.h	13 Jul 2006 17:18:48 -0000	1.7
+++ include/linux/nfsd/nfsd.h	6 Sep 2006 20:05:34 -0000
@@ -234,13 +234,22 @@
 #define	nfserr_badname		__constant_htonl(NFSERR_BADNAME)
 #define	nfserr_cb_path_down	__constant_htonl(NFSERR_CB_PATH_DOWN)
 #define	nfserr_locked		__constant_htonl(NFSERR_LOCKED)
-#define	nfserr_unknown_layouttype	__constant_htonl(NFSERR_UNKNOWN_LAYOUTTYPE)
-#define	nfserr_nomatching_layouttype	__constant_htonl(NFSERR_NOMATCHING_LAYOUTTYPE)
-#define	nfserr_nfserr_badlayouttype	__constant_htonl(NFSERR_BADLAYOUTTYPE)
-#define	nfserr_layoutunavailable	__constant_htonl(NFSERR_LAYOUTUNAVAILABLE)
+#define	nfserr_badiomode	__constant_htonl(NFSERR_BADIOMODE)
+#define	nfserr_badlayout	__constant_htonl(NFSERR_BADLAYOUT)
+#define	nfserr_bad_session_digest	__constant_htonl(NFSERR_BAD_SESSION_DIGEST)
+#define	nfserr_badsession		__constant_htonl(NFSERR_BADSESSION)
+#define	nfserr_badslot			__constant_htonl(NFSERR_BADSLOT)
+#define	nfserr_complete_already		__constant_htonl(NFSERR_COMPLETE_ALREADY)
+#define	nfserr_conn_not_bound_to_session __constant_htonl(NFSERR_CONN_NOT_BOUND_TO_SESSION)
+#define	nfserr_deleg_already_wanted	__constant_htonl(NFSERR_DELEG_ALREADY_WANTED)
+#define	nfserr_dirdeleg_unavail		__constant_htonl(NFSERR_DIRDELEG_UNAVAIL)
 #define	nfserr_layouttrylater		__constant_htonl(NFSERR_LAYOUTTRYLATER)
+#define	nfserr_layoutunavailable	__constant_htonl(NFSERR_LAYOUTUNAVAILABLE)
+#define	nfserr_nomatching_layout	__constant_htonl(NFSERR_NOMATCHING_LAYOUT)
 #define	nfserr_recallconflict		__constant_htonl(NFSERR_RECALLCONFLICT)
-#define	nfserr_badiomode		__constant_htonl(NFSERR_BADIOMODE)
+#define	nfserr_unknown_layouttype	__constant_htonl(NFSERR_UNKNOWN_LAYOUTTYPE)
+#define	nfserr_seq_misordered		__constant_htonl(NFSERR_SEQ_MISORDERED)
+#define	nfserr_sequence_pos		__constant_htonl(NFSERR_SEQUENCE_POS)
 
 /* error codes for internal use */
 /* if a request fails due to kmalloc failure, it gets dropped.


More information about the pNFS mailing list