session: use target_highest_slotid to limit slot table

adds support for CB_RECALL_SLOT with function nfs41_session_recall_slot()

when SEQUENCE or CB_RECALL_SLOT gives us a valid target_highest_slotid, use it to update max_slots

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2012-05-09 13:48:35 -04:00 committed by Olga Kornievskaia
parent 1905abd027
commit a3146af76d
4 changed files with 49 additions and 6 deletions

View file

@ -85,10 +85,12 @@ static enum_t handle_cb_layoutrecall(
/* OP_CB_RECALL_SLOT */
static enum_t handle_cb_recall_slot(
IN nfs41_rpc_clnt *rpc_clnt,
IN struct cb_recall_slot_args *args,
OUT struct cb_recall_slot_res *res)
{
res->status = NFS4_OK;
res->status = nfs41_session_recall_slot(rpc_clnt->client->session,
args->target_highest_slotid);
dprintf(CBSLVL, " OP_CB_RECALL_SLOT { %u } %s\n",
args->target_highest_slotid, nfs_error_string(res->status));
@ -425,8 +427,8 @@ static void handle_cb_compound(nfs41_rpc_clnt *rpc_clnt, cb_req *req, struct cb_
break;
case OP_CB_RECALL_SLOT:
dprintf(1, "OP_CB_RECALL_SLOT\n");
res->status = handle_cb_recall_slot(&argop->args.recall_slot,
&resop->res.recall_slot);
res->status = handle_cb_recall_slot(rpc_clnt,
&argop->args.recall_slot, &resop->res.recall_slot);
break;
case OP_CB_SEQUENCE:
dprintf(1, "OP_CB_SEQUENCE\n");