diff options
author | NeilBrown <neilb@suse.de> | 2006-04-11 01:55:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-11 09:18:53 -0400 |
commit | 358dd55aa3a77fbbae482b83d96733d9ad441d05 (patch) | |
tree | d72352df2fc26e94a22202917df7db13c9563085 /fs/nfsd/nfs4state.c | |
parent | ef0f3390ebedac78bff1936bbb26606bca83e891 (diff) |
[PATCH] knfsd: nfsd4: grant delegations more frequently
Keep unused openowners around for at least one lease period, to avoid the need
for as many open confirmations and to allow handing out more delegations.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 1e2a89aaf895..96c7578cbe1e 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -1199,8 +1199,7 @@ move_to_close_lru(struct nfs4_stateowner *sop) | |||
1199 | { | 1199 | { |
1200 | dprintk("NFSD: move_to_close_lru nfs4_stateowner %p\n", sop); | 1200 | dprintk("NFSD: move_to_close_lru nfs4_stateowner %p\n", sop); |
1201 | 1201 | ||
1202 | unhash_stateowner(sop); | 1202 | list_move_tail(&sop->so_close_lru, &close_lru); |
1203 | list_add_tail(&sop->so_close_lru, &close_lru); | ||
1204 | sop->so_time = get_seconds(); | 1203 | sop->so_time = get_seconds(); |
1205 | } | 1204 | } |
1206 | 1205 | ||
@@ -1929,8 +1928,7 @@ nfs4_laundromat(void) | |||
1929 | } | 1928 | } |
1930 | dprintk("NFSD: purging unused open stateowner (so_id %d)\n", | 1929 | dprintk("NFSD: purging unused open stateowner (so_id %d)\n", |
1931 | sop->so_id); | 1930 | sop->so_id); |
1932 | list_del(&sop->so_close_lru); | 1931 | release_stateowner(sop); |
1933 | nfs4_put_stateowner(sop); | ||
1934 | } | 1932 | } |
1935 | if (clientid_val < NFSD_LAUNDROMAT_MINTIMEOUT) | 1933 | if (clientid_val < NFSD_LAUNDROMAT_MINTIMEOUT) |
1936 | clientid_val = NFSD_LAUNDROMAT_MINTIMEOUT; | 1934 | clientid_val = NFSD_LAUNDROMAT_MINTIMEOUT; |
@@ -3218,15 +3216,8 @@ __nfs4_state_shutdown(void) | |||
3218 | int i; | 3216 | int i; |
3219 | struct nfs4_client *clp = NULL; | 3217 | struct nfs4_client *clp = NULL; |
3220 | struct nfs4_delegation *dp = NULL; | 3218 | struct nfs4_delegation *dp = NULL; |
3221 | struct nfs4_stateowner *sop = NULL; | ||
3222 | struct list_head *pos, *next, reaplist; | 3219 | struct list_head *pos, *next, reaplist; |
3223 | 3220 | ||
3224 | list_for_each_safe(pos, next, &close_lru) { | ||
3225 | sop = list_entry(pos, struct nfs4_stateowner, so_close_lru); | ||
3226 | list_del(&sop->so_close_lru); | ||
3227 | nfs4_put_stateowner(sop); | ||
3228 | } | ||
3229 | |||
3230 | for (i = 0; i < CLIENT_HASH_SIZE; i++) { | 3221 | for (i = 0; i < CLIENT_HASH_SIZE; i++) { |
3231 | while (!list_empty(&conf_id_hashtbl[i])) { | 3222 | while (!list_empty(&conf_id_hashtbl[i])) { |
3232 | clp = list_entry(conf_id_hashtbl[i].next, struct nfs4_client, cl_idhash); | 3223 | clp = list_entry(conf_id_hashtbl[i].next, struct nfs4_client, cl_idhash); |