diff options
author | J. Bruce Fields <bfields@redhat.com> | 2011-01-10 16:44:41 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2011-01-11 15:04:11 -0500 |
commit | 5ce8ba25d657a71d6d8cdb05a2b90c5ae7debfda (patch) | |
tree | 831d815e91e23de373fe7fdc7a54b3eb098067f5 /fs/nfsd/state.h | |
parent | 3ff3600e7eab16301e824293e8f49b9990bd4641 (diff) |
nfsd4: allow restarting callbacks
If we lose the backchannel and then the client repairs the problem,
resend any callbacks.
We use a new cb_done flag to track whether there is still work to be
done for the callback or whether it can be destroyed with the rpc.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/state.h')
-rw-r--r-- | fs/nfsd/state.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h index 4e5bdfd9169c..3074656ba7bf 100644 --- a/fs/nfsd/state.h +++ b/fs/nfsd/state.h | |||
@@ -68,10 +68,12 @@ typedef struct { | |||
68 | struct nfsd4_callback { | 68 | struct nfsd4_callback { |
69 | void *cb_op; | 69 | void *cb_op; |
70 | struct nfs4_client *cb_clp; | 70 | struct nfs4_client *cb_clp; |
71 | struct list_head cb_per_client; | ||
71 | u32 cb_minorversion; | 72 | u32 cb_minorversion; |
72 | struct rpc_message cb_msg; | 73 | struct rpc_message cb_msg; |
73 | const struct rpc_call_ops *cb_ops; | 74 | const struct rpc_call_ops *cb_ops; |
74 | struct work_struct cb_work; | 75 | struct work_struct cb_work; |
76 | bool cb_done; | ||
75 | }; | 77 | }; |
76 | 78 | ||
77 | struct nfs4_delegation { | 79 | struct nfs4_delegation { |
@@ -248,6 +250,7 @@ struct nfs4_client { | |||
248 | int cl_cb_state; | 250 | int cl_cb_state; |
249 | struct nfsd4_callback cl_cb_null; | 251 | struct nfsd4_callback cl_cb_null; |
250 | struct nfsd4_session *cl_cb_session; | 252 | struct nfsd4_session *cl_cb_session; |
253 | struct list_head cl_callbacks; /* list of in-progress callbacks */ | ||
251 | 254 | ||
252 | /* for all client information that callback code might need: */ | 255 | /* for all client information that callback code might need: */ |
253 | spinlock_t cl_lock; | 256 | spinlock_t cl_lock; |