2005-03-08 06:06:58

by NeilBrown

[permalink] [raw]
Subject: [PATCH kNFSd 39 of 54] nfsd4: fix laundromat delegation reaping



The laundromat is freeing any delegation it finds in the RECALL_COMPLETE state.
But note that RECALL_COMPLETE is the state that the delegation recall callback
leaves the state in. We shouldn't actually be giving up on the delegation till
either the client has had a chance to call delegreturn, or the lease time has
run out.

Signed-off-by: J. Bruce Fields <[email protected]>
Signed-off-by: Neil Brown <[email protected]>

### Diffstat output
./fs/nfsd/nfs4state.c | 3 ---
1 files changed, 3 deletions(-)

diff ./fs/nfsd/nfs4state.c~current~ ./fs/nfsd/nfs4state.c
--- ./fs/nfsd/nfs4state.c~current~ 2005-03-07 13:26:43.000000000 +1100
+++ ./fs/nfsd/nfs4state.c 2005-03-07 13:27:24.000000000 +1100
@@ -1861,15 +1861,12 @@ nfs4_laundromat(void)
spin_lock(&recall_lock);
list_for_each_safe(pos, next, &del_recall_lru) {
dp = list_entry (pos, struct nfs4_delegation, dl_recall_lru);
- if (atomic_read(&dp->dl_state) == NFS4_RECALL_COMPLETE)
- goto reap;
if (time_after((unsigned long)dp->dl_time, (unsigned long)cutoff)) {
u = dp->dl_time - cutoff;
if (test_val > u)
test_val = u;
break;
}
-reap:
dprintk("NFSD: purging unused delegation dp %p, fp %p\n",
dp, dp->dl_flock);
release_delegation(dp);


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs