aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4callback.c10
-rw-r--r--fs/nfsd/nfs4state.c8
-rw-r--r--fs/nfsd/state.h1
3 files changed, 18 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index de018ecadae6..7748d6a18d97 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -39,6 +39,8 @@
39 39
40#define NFSDDBG_FACILITY NFSDDBG_PROC 40#define NFSDDBG_FACILITY NFSDDBG_PROC
41 41
42static void nfsd4_mark_cb_fault(struct nfs4_client *, int reason);
43
42#define NFSPROC4_CB_NULL 0 44#define NFSPROC4_CB_NULL 0
43#define NFSPROC4_CB_COMPOUND 1 45#define NFSPROC4_CB_COMPOUND 1
44 46
@@ -460,6 +462,8 @@ static int decode_cb_sequence4resok(struct xdr_stream *xdr,
460 */ 462 */
461 status = 0; 463 status = 0;
462out: 464out:
465 if (status)
466 nfsd4_mark_cb_fault(cb->cb_clp, status);
463 return status; 467 return status;
464out_overflow: 468out_overflow:
465 print_overflow_msg(__func__, xdr); 469 print_overflow_msg(__func__, xdr);
@@ -686,6 +690,12 @@ static void nfsd4_mark_cb_down(struct nfs4_client *clp, int reason)
686 warn_no_callback_path(clp, reason); 690 warn_no_callback_path(clp, reason);
687} 691}
688 692
693static void nfsd4_mark_cb_fault(struct nfs4_client *clp, int reason)
694{
695 clp->cl_cb_state = NFSD4_CB_FAULT;
696 warn_no_callback_path(clp, reason);
697}
698
689static void nfsd4_cb_probe_done(struct rpc_task *task, void *calldata) 699static void nfsd4_cb_probe_done(struct rpc_task *task, void *calldata)
690{ 700{
691 struct nfs4_client *clp = container_of(calldata, struct nfs4_client, cl_cb_null); 701 struct nfs4_client *clp = container_of(calldata, struct nfs4_client, cl_cb_null);
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index e8c2a3ec0e60..b51ad43b7ea1 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1945,8 +1945,14 @@ out:
1945 1945
1946 nfsd4_get_session(cstate->session); 1946 nfsd4_get_session(cstate->session);
1947 atomic_inc(&clp->cl_refcount); 1947 atomic_inc(&clp->cl_refcount);
1948 if (clp->cl_cb_state == NFSD4_CB_DOWN) 1948 switch (clp->cl_cb_state) {
1949 case NFSD4_CB_DOWN:
1949 seq->status_flags |= SEQ4_STATUS_CB_PATH_DOWN; 1950 seq->status_flags |= SEQ4_STATUS_CB_PATH_DOWN;
1951 break;
1952 case NFSD4_CB_FAULT:
1953 seq->status_flags |= SEQ4_STATUS_BACKCHANNEL_FAULT;
1954 break;
1955 }
1950 } 1956 }
1951 kfree(conn); 1957 kfree(conn);
1952 spin_unlock(&client_lock); 1958 spin_unlock(&client_lock);
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
index 1a5820066040..a3cf38476a1b 100644
--- a/fs/nfsd/state.h
+++ b/fs/nfsd/state.h
@@ -258,6 +258,7 @@ struct nfs4_client {
258#define NFSD4_CB_UP 0 258#define NFSD4_CB_UP 0
259#define NFSD4_CB_UNKNOWN 1 259#define NFSD4_CB_UNKNOWN 1
260#define NFSD4_CB_DOWN 2 260#define NFSD4_CB_DOWN 2
261#define NFSD4_CB_FAULT 3
261 int cl_cb_state; 262 int cl_cb_state;
262 struct nfsd4_callback cl_cb_null; 263 struct nfsd4_callback cl_cb_null;
263 struct nfsd4_session *cl_cb_session; 264 struct nfsd4_session *cl_cb_session;