namecache: delegation-related fixes
open_update_cache() wasn't retrying insert after the open_delegation_return() error case nfs41_name_cache_delegreturn() needs a check for if (attributes->delegated) to avoid an extra deref when the call to nfs41_name_cache_insert() failed added a TODO comment to nfs41_client_delegation_return_lru() for improvements to the naive algorithm Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
48fa809fc5
commit
0d86c68138
3 changed files with 19 additions and 17 deletions
|
|
@ -806,8 +806,13 @@ int nfs41_client_delegation_return_lru(
|
|||
nfs41_delegation_state *state = NULL;
|
||||
int status = NFS4ERR_BADHANDLE;
|
||||
|
||||
/* starting from the least recently opened, find a delegation
|
||||
* that's not 'in use' and return it */
|
||||
/* starting from the least recently opened, find and return
|
||||
* the first delegation that's not 'in use' (currently open) */
|
||||
|
||||
/* TODO: use a more robust algorithm, taking into account:
|
||||
* -number of total opens
|
||||
* -time since last operation on an associated open, or
|
||||
* -number of operations/second over last n seconds */
|
||||
EnterCriticalSection(&client->state.lock);
|
||||
list_for_each(entry, &client->state.delegations) {
|
||||
state = deleg_entry(entry);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue