diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2012-11-27 15:11:44 +0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-11-28 19:39:46 +0400 |
commit | 3d7337115d06f21970e23684f4d2e62e3a44c572 (patch) | |
tree | 08701fd0025986ff1b0ec6d70022189c000876c3 /fs/nfsd/nfs4state.c | |
parent | 864aee5c6f90533984c356494e6b0a8070e5d5f2 (diff) | |
download | linux-3d7337115d06f21970e23684f4d2e62e3a44c572.tar.xz |
nfsd: make NFSv4 lease time per net
Lease time is a part of NFSv4 state engine, which is constructed per network
namespace.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index fb98f291aac2..932b2ca6f203 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -51,7 +51,6 @@ #define NFSDDBG_FACILITY NFSDDBG_PROC /* Globals */ -time_t nfsd4_lease = 90; /* default lease time */ time_t nfsd4_grace = 90; #define all_ones {{~0,~0},~0} @@ -3184,7 +3183,7 @@ nfsd4_end_grace(struct nfsd_net *nn) * to see the (possibly new, possibly shorter) lease time, we * can safely set the next grace time to the current lease time: */ - nfsd4_grace = nfsd4_lease; + nfsd4_grace = nn->nfsd4_lease; } static time_t @@ -3194,9 +3193,9 @@ nfs4_laundromat(struct nfsd_net *nn) struct nfs4_openowner *oo; struct nfs4_delegation *dp; struct list_head *pos, *next, reaplist; - time_t cutoff = get_seconds() - nfsd4_lease; - time_t t, clientid_val = nfsd4_lease; - time_t u, test_val = nfsd4_lease; + time_t cutoff = get_seconds() - nn->nfsd4_lease; + time_t t, clientid_val = nn->nfsd4_lease; + time_t u, test_val = nn->nfsd4_lease; nfs4_lock_state(); @@ -3245,7 +3244,7 @@ nfs4_laundromat(struct nfsd_net *nn) dp = list_entry (pos, struct nfs4_delegation, dl_recall_lru); unhash_delegation(dp); } - test_val = nfsd4_lease; + test_val = nn->nfsd4_lease; list_for_each_safe(pos, next, &nn->close_lru) { oo = container_of(pos, struct nfs4_openowner, oo_close_lru); if (time_after((unsigned long)oo->oo_time, (unsigned long)cutoff)) { |