callback: replay cache for back channel
nfs41_cb_session stores the last cb_compound reply (whether or not cachethis was set) to handle retry attempts, along with the cb_compound arguments for improved NFS4ERR_SEQ_FALSE_RETRY detection Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
32be705e4d
commit
cc2efe6a96
7 changed files with 265 additions and 80 deletions
|
|
@ -172,7 +172,6 @@ static bool_t op_cb_sequence_args(XDR *xdr, struct cb_sequence_args *args)
|
|||
{
|
||||
bool_t result;
|
||||
|
||||
dprintf(1, "decoding sequence args\n");
|
||||
result = xdr_opaque(xdr, args->sessionid, NFS4_SESSIONID_SIZE);
|
||||
if (!result) { CBX_ERR("sequence_args.sessionid"); goto out; }
|
||||
|
||||
|
|
@ -505,13 +504,12 @@ static const struct xdr_discrim cb_resop_discrim[] = {
|
|||
|
||||
static bool_t cb_compound_resop(XDR *xdr, struct cb_resop *res)
|
||||
{
|
||||
bool_t result;
|
||||
|
||||
result = xdr_union(xdr, &res->opnum, (char*)&res->res,
|
||||
/* save xdr encode/decode status to see which operation failed */
|
||||
res->xdr_ok = xdr_union(xdr, &res->opnum, (char*)&res->res,
|
||||
cb_resop_discrim, NULL_xdrproc_t);
|
||||
if (!result) { CBX_ERR("resop.res"); goto out; }
|
||||
if (!res->xdr_ok) { CBX_ERR("resop.res"); goto out; }
|
||||
out:
|
||||
return result;
|
||||
return res->xdr_ok;
|
||||
}
|
||||
|
||||
bool_t proc_cb_compound_res(XDR *xdr, struct cb_compound_res *res)
|
||||
|
|
@ -532,8 +530,7 @@ bool_t proc_cb_compound_res(XDR *xdr, struct cb_compound_res *res)
|
|||
sizeof(struct cb_resop), (xdrproc_t)cb_compound_resop);
|
||||
if (!result) { CBX_ERR("compound_res.resarray"); goto out; }
|
||||
out:
|
||||
free(res->resarray);
|
||||
free(res);
|
||||
|
||||
if (xdr->x_op == XDR_FREE)
|
||||
free(res);
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue