nfsd41: define nfs41 error codes
authorMarc Eshel <eshel@almaden.ibm.com>
Fri, 3 Apr 2009 05:27:40 +0000 (08:27 +0300)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Sat, 4 Apr 2009 00:41:12 +0000 (17:41 -0700)
Define all error code present in
http://tools.ietf.org/html/draft-ietf-nfsv4-minorversion1-29.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[nfsd41: clean up error code definitions]
[nfsd41: change NFSERR_REPLAY_ME]
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
include/linux/nfs.h
include/linux/nfsd/nfsd.h

index 54af92c1c70b29c1f0eb9f4369a015714531fa34..214d499718f746d1408a3f5140771ae37bdb25b2 100644 (file)
        NFSERR_FILE_OPEN = 10046,      /*       v4 */
        NFSERR_ADMIN_REVOKED = 10047,  /*       v4 */
        NFSERR_CB_PATH_DOWN = 10048,   /*       v4 */
-       NFSERR_REPLAY_ME = 10049        /*       v4 */
 };
 
 /* NFSv2 file types - beware, these are not the same in NFSv3 */
index 54beda12d26bb2b5faebbb8cfdc13ec72e2a2b76..ab9616d09204df994b37370ec1b90387f01cc6bc 100644 (file)
@@ -249,7 +249,44 @@ void               nfsd_lockd_shutdown(void);
 #define        nfserr_cb_path_down     cpu_to_be32(NFSERR_CB_PATH_DOWN)
 #define        nfserr_locked           cpu_to_be32(NFSERR_LOCKED)
 #define        nfserr_wrongsec         cpu_to_be32(NFSERR_WRONGSEC)
-#define        nfserr_replay_me        cpu_to_be32(NFSERR_REPLAY_ME)
+#define nfserr_badiomode               cpu_to_be32(NFS4ERR_BADIOMODE)
+#define nfserr_badlayout               cpu_to_be32(NFS4ERR_BADLAYOUT)
+#define nfserr_bad_session_digest      cpu_to_be32(NFS4ERR_BAD_SESSION_DIGEST)
+#define nfserr_badsession              cpu_to_be32(NFS4ERR_BADSESSION)
+#define nfserr_badslot                 cpu_to_be32(NFS4ERR_BADSLOT)
+#define nfserr_complete_already                cpu_to_be32(NFS4ERR_COMPLETE_ALREADY)
+#define nfserr_conn_not_bound_to_session cpu_to_be32(NFS4ERR_CONN_NOT_BOUND_TO_SESSION)
+#define nfserr_deleg_already_wanted    cpu_to_be32(NFS4ERR_DELEG_ALREADY_WANTED)
+#define nfserr_back_chan_busy          cpu_to_be32(NFS4ERR_BACK_CHAN_BUSY)
+#define nfserr_layouttrylater          cpu_to_be32(NFS4ERR_LAYOUTTRYLATER)
+#define nfserr_layoutunavailable       cpu_to_be32(NFS4ERR_LAYOUTUNAVAILABLE)
+#define nfserr_nomatching_layout       cpu_to_be32(NFS4ERR_NOMATCHING_LAYOUT)
+#define nfserr_recallconflict          cpu_to_be32(NFS4ERR_RECALLCONFLICT)
+#define nfserr_unknown_layouttype      cpu_to_be32(NFS4ERR_UNKNOWN_LAYOUTTYPE)
+#define nfserr_seq_misordered          cpu_to_be32(NFS4ERR_SEQ_MISORDERED)
+#define nfserr_sequence_pos            cpu_to_be32(NFS4ERR_SEQUENCE_POS)
+#define nfserr_req_too_big             cpu_to_be32(NFS4ERR_REQ_TOO_BIG)
+#define nfserr_rep_too_big             cpu_to_be32(NFS4ERR_REP_TOO_BIG)
+#define nfserr_rep_too_big_to_cache    cpu_to_be32(NFS4ERR_REP_TOO_BIG_TO_CACHE)
+#define nfserr_retry_uncached_rep      cpu_to_be32(NFS4ERR_RETRY_UNCACHED_REP)
+#define nfserr_unsafe_compound         cpu_to_be32(NFS4ERR_UNSAFE_COMPOUND)
+#define nfserr_too_many_ops            cpu_to_be32(NFS4ERR_TOO_MANY_OPS)
+#define nfserr_op_not_in_session       cpu_to_be32(NFS4ERR_OP_NOT_IN_SESSION)
+#define nfserr_hash_alg_unsupp         cpu_to_be32(NFS4ERR_HASH_ALG_UNSUPP)
+#define nfserr_clientid_busy           cpu_to_be32(NFS4ERR_CLIENTID_BUSY)
+#define nfserr_pnfs_io_hole            cpu_to_be32(NFS4ERR_PNFS_IO_HOLE)
+#define nfserr_seq_false_retry         cpu_to_be32(NFS4ERR_SEQ_FALSE_RETRY)
+#define nfserr_bad_high_slot           cpu_to_be32(NFS4ERR_BAD_HIGH_SLOT)
+#define nfserr_deadsession             cpu_to_be32(NFS4ERR_DEADSESSION)
+#define nfserr_encr_alg_unsupp         cpu_to_be32(NFS4ERR_ENCR_ALG_UNSUPP)
+#define nfserr_pnfs_no_layout          cpu_to_be32(NFS4ERR_PNFS_NO_LAYOUT)
+#define nfserr_not_only_op             cpu_to_be32(NFS4ERR_NOT_ONLY_OP)
+#define nfserr_wrong_cred              cpu_to_be32(NFS4ERR_WRONG_CRED)
+#define nfserr_wrong_type              cpu_to_be32(NFS4ERR_WRONG_TYPE)
+#define nfserr_dirdeleg_unavail                cpu_to_be32(NFS4ERR_DIRDELEG_UNAVAIL)
+#define nfserr_reject_deleg            cpu_to_be32(NFS4ERR_REJECT_DELEG)
+#define nfserr_returnconflict          cpu_to_be32(NFS4ERR_RETURNCONFLICT)
+#define nfserr_deleg_revoked           cpu_to_be32(NFS4ERR_DELEG_REVOKED)
 
 /* error codes for internal use */
 /* if a request fails due to kmalloc failure, it gets dropped.
@@ -258,6 +295,10 @@ void               nfsd_lockd_shutdown(void);
 #define        nfserr_dropit           cpu_to_be32(30000)
 /* end-of-file indicator in readdir */
 #define        nfserr_eof              cpu_to_be32(30001)
+/* replay detected */
+#define        nfserr_replay_me        cpu_to_be32(11001)
+/* nfs41 replay detected */
+#define        nfserr_replay_cache     cpu_to_be32(11002)
 
 /* Check for dir entries '.' and '..' */
 #define isdotent(n, l) (l < 3 && n[0] == '.' && (l == 1 || n[1] == '.'))