NFS add session back channel draining
Currently session draining only drains the fore channel. The back channel processing must also be drained. Use the back channel highest_slot_used to indicate that a callback is being processed by the callback thread. Move the session complete to be per channel. When the session is draininig, wait for any current back channel processing to complete and stop all new back channel processing by returning NFS4ERR_DELAY to the back channel client. Drain the back channel, then the fore channel. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
ece0de633c
commit
42acd02182
6 changed files with 86 additions and 16 deletions
|
@ -253,6 +253,12 @@ __be32 nfs4_callback_sequence(struct cb_sequenceargs *args,
|
|||
if (clp == NULL)
|
||||
goto out;
|
||||
|
||||
/* state manager is resetting the session */
|
||||
if (test_bit(NFS4_SESSION_DRAINING, &clp->cl_session->session_state)) {
|
||||
status = NFS4ERR_DELAY;
|
||||
goto out;
|
||||
}
|
||||
|
||||
status = validate_seqid(&clp->cl_session->bc_slot_table, args);
|
||||
if (status)
|
||||
goto out;
|
||||
|
@ -273,6 +279,7 @@ __be32 nfs4_callback_sequence(struct cb_sequenceargs *args,
|
|||
res->csr_slotid = args->csa_slotid;
|
||||
res->csr_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
|
||||
res->csr_target_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
|
||||
nfs4_cb_take_slot(clp);
|
||||
cps->clp = clp; /* put in nfs4_callback_compound */
|
||||
|
||||
out:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue