aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMarc Eshel <eshel@almaden.ibm.com>2009-04-03 01:27:40 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-04-03 20:41:12 -0400
commit10add806c38c022d18af48f3ec28c91b4eaf7bb3 (patch)
treed0d141a89d5eac49e337021e1d6d9c451cc4e896 /include
parent18df1884a872a2cc405a578cfd0d3adc8d227277 (diff)
nfsd41: define nfs41 error codes
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfs.h1
-rw-r--r--include/linux/nfsd/nfsd.h43
2 files changed, 42 insertions, 2 deletions
diff --git a/include/linux/nfs.h b/include/linux/nfs.h
index 54af92c1c70b..214d499718f7 100644
--- a/include/linux/nfs.h
+++ b/include/linux/nfs.h
@@ -109,7 +109,6 @@
109 NFSERR_FILE_OPEN = 10046, /* v4 */ 109 NFSERR_FILE_OPEN = 10046, /* v4 */
110 NFSERR_ADMIN_REVOKED = 10047, /* v4 */ 110 NFSERR_ADMIN_REVOKED = 10047, /* v4 */
111 NFSERR_CB_PATH_DOWN = 10048, /* v4 */ 111 NFSERR_CB_PATH_DOWN = 10048, /* v4 */
112 NFSERR_REPLAY_ME = 10049 /* v4 */
113}; 112};
114 113
115/* NFSv2 file types - beware, these are not the same in NFSv3 */ 114/* NFSv2 file types - beware, these are not the same in NFSv3 */
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h
index 54beda12d26b..ab9616d09204 100644
--- a/include/linux/nfsd/nfsd.h
+++ b/include/linux/nfsd/nfsd.h
@@ -249,7 +249,44 @@ void nfsd_lockd_shutdown(void);
249#define nfserr_cb_path_down cpu_to_be32(NFSERR_CB_PATH_DOWN) 249#define nfserr_cb_path_down cpu_to_be32(NFSERR_CB_PATH_DOWN)
250#define nfserr_locked cpu_to_be32(NFSERR_LOCKED) 250#define nfserr_locked cpu_to_be32(NFSERR_LOCKED)
251#define nfserr_wrongsec cpu_to_be32(NFSERR_WRONGSEC) 251#define nfserr_wrongsec cpu_to_be32(NFSERR_WRONGSEC)
252#define nfserr_replay_me cpu_to_be32(NFSERR_REPLAY_ME) 252#define nfserr_badiomode cpu_to_be32(NFS4ERR_BADIOMODE)
253#define nfserr_badlayout cpu_to_be32(NFS4ERR_BADLAYOUT)
254#define nfserr_bad_session_digest cpu_to_be32(NFS4ERR_BAD_SESSION_DIGEST)
255#define nfserr_badsession cpu_to_be32(NFS4ERR_BADSESSION)
256#define nfserr_badslot cpu_to_be32(NFS4ERR_BADSLOT)
257#define nfserr_complete_already cpu_to_be32(NFS4ERR_COMPLETE_ALREADY)
258#define nfserr_conn_not_bound_to_session cpu_to_be32(NFS4ERR_CONN_NOT_BOUND_TO_SESSION)
259#define nfserr_deleg_already_wanted cpu_to_be32(NFS4ERR_DELEG_ALREADY_WANTED)
260#define nfserr_back_chan_busy cpu_to_be32(NFS4ERR_BACK_CHAN_BUSY)
261#define nfserr_layouttrylater cpu_to_be32(NFS4ERR_LAYOUTTRYLATER)
262#define nfserr_layoutunavailable cpu_to_be32(NFS4ERR_LAYOUTUNAVAILABLE)
263#define nfserr_nomatching_layout cpu_to_be32(NFS4ERR_NOMATCHING_LAYOUT)
264#define nfserr_recallconflict cpu_to_be32(NFS4ERR_RECALLCONFLICT)
265#define nfserr_unknown_layouttype cpu_to_be32(NFS4ERR_UNKNOWN_LAYOUTTYPE)
266#define nfserr_seq_misordered cpu_to_be32(NFS4ERR_SEQ_MISORDERED)
267#define nfserr_sequence_pos cpu_to_be32(NFS4ERR_SEQUENCE_POS)
268#define nfserr_req_too_big cpu_to_be32(NFS4ERR_REQ_TOO_BIG)
269#define nfserr_rep_too_big cpu_to_be32(NFS4ERR_REP_TOO_BIG)
270#define nfserr_rep_too_big_to_cache cpu_to_be32(NFS4ERR_REP_TOO_BIG_TO_CACHE)
271#define nfserr_retry_uncached_rep cpu_to_be32(NFS4ERR_RETRY_UNCACHED_REP)
272#define nfserr_unsafe_compound cpu_to_be32(NFS4ERR_UNSAFE_COMPOUND)
273#define nfserr_too_many_ops cpu_to_be32(NFS4ERR_TOO_MANY_OPS)
274#define nfserr_op_not_in_session cpu_to_be32(NFS4ERR_OP_NOT_IN_SESSION)
275#define nfserr_hash_alg_unsupp cpu_to_be32(NFS4ERR_HASH_ALG_UNSUPP)
276#define nfserr_clientid_busy cpu_to_be32(NFS4ERR_CLIENTID_BUSY)
277#define nfserr_pnfs_io_hole cpu_to_be32(NFS4ERR_PNFS_IO_HOLE)
278#define nfserr_seq_false_retry cpu_to_be32(NFS4ERR_SEQ_FALSE_RETRY)
279#define nfserr_bad_high_slot cpu_to_be32(NFS4ERR_BAD_HIGH_SLOT)
280#define nfserr_deadsession cpu_to_be32(NFS4ERR_DEADSESSION)
281#define nfserr_encr_alg_unsupp cpu_to_be32(NFS4ERR_ENCR_ALG_UNSUPP)
282#define nfserr_pnfs_no_layout cpu_to_be32(NFS4ERR_PNFS_NO_LAYOUT)
283#define nfserr_not_only_op cpu_to_be32(NFS4ERR_NOT_ONLY_OP)
284#define nfserr_wrong_cred cpu_to_be32(NFS4ERR_WRONG_CRED)
285#define nfserr_wrong_type cpu_to_be32(NFS4ERR_WRONG_TYPE)
286#define nfserr_dirdeleg_unavail cpu_to_be32(NFS4ERR_DIRDELEG_UNAVAIL)
287#define nfserr_reject_deleg cpu_to_be32(NFS4ERR_REJECT_DELEG)
288#define nfserr_returnconflict cpu_to_be32(NFS4ERR_RETURNCONFLICT)
289#define nfserr_deleg_revoked cpu_to_be32(NFS4ERR_DELEG_REVOKED)
253 290
254/* error codes for internal use */ 291/* error codes for internal use */
255/* if a request fails due to kmalloc failure, it gets dropped. 292/* if a request fails due to kmalloc failure, it gets dropped.
@@ -258,6 +295,10 @@ void nfsd_lockd_shutdown(void);
258#define nfserr_dropit cpu_to_be32(30000) 295#define nfserr_dropit cpu_to_be32(30000)
259/* end-of-file indicator in readdir */ 296/* end-of-file indicator in readdir */
260#define nfserr_eof cpu_to_be32(30001) 297#define nfserr_eof cpu_to_be32(30001)
298/* replay detected */
299#define nfserr_replay_me cpu_to_be32(11001)
300/* nfs41 replay detected */
301#define nfserr_replay_cache cpu_to_be32(11002)
261 302
262/* Check for dir entries '.' and '..' */ 303/* Check for dir entries '.' and '..' */
263#define isdotent(n, l) (l < 3 && n[0] == '.' && (l == 1 || n[1] == '.')) 304#define isdotent(n, l) (l < 3 && n[0] == '.' && (l == 1 || n[1] == '.'))