nfsd: keep a tally of RECLAIM_COMPLETE operations when using nfsdcld

When using nfsdcld for NFSv4 client tracking, track the number of
RECLAIM_COMPLETE operations we receive from "known" clients to help in
deciding if we can lift the grace period early (or whether we need to
start a v4 grace period at all).

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
Scott Mayhew
2019-03-26 18:06:28 -04:00
committed by J. Bruce Fields
parent 74725959c3
commit 362063a595
4 changed files with 39 additions and 1 deletions

View File

@@ -1242,6 +1242,7 @@ static __net_init int nfsd_init_net(struct net *net)
nn->nfsd4_lease = 90; /* default lease time */
nn->nfsd4_grace = 90;
nn->somebody_reclaimed = false;
nn->track_reclaim_completes = false;
nn->clverifier_counter = prandom_u32();
nn->clientid_counter = prandom_u32();
nn->s2s_cp_cl_id = nn->clientid_counter++;