Commit 3aea09dc9106407d8bc18e593fbffda9ad632844

Authored by J. Bruce Fields
1 parent 6707bd3d42

nfsd4: track recall retries in nfs4_delegation

Move this out of a local variable into the nfs4_delegation object in
preparation for making this an async rpc call (at which point we'll need
any state like this in a common object that's preserved across function
calls).

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

Showing 2 changed files with 3 additions and 2 deletions Side-by-side Diff

fs/nfsd/nfs4callback.c
... ... @@ -507,11 +507,11 @@
507 507 .rpc_argp = dp,
508 508 .rpc_cred = clp->cl_cb_conn.cb_cred
509 509 };
510   - int retries = 1;
511 510 int status = 0;
512 511  
  512 + dp->dl_retries = 1;
513 513 status = rpc_call_sync(clnt, &msg, RPC_TASK_SOFT);
514   - while (retries--) {
  514 + while (dp->dl_retries--) {
515 515 switch (status) {
516 516 case -EIO:
517 517 /* Network partition? */
include/linux/nfsd/state.h
... ... @@ -76,6 +76,7 @@
76 76 u32 dl_ident;
77 77 stateid_t dl_stateid;
78 78 struct knfsd_fh dl_fh;
  79 + int dl_retries;
79 80 };
80 81  
81 82 /* client delegation callback info */