deleg: return delegation before conflicting operations
new function nfs41_delegation_return() for synchronous delegation return. uses a condition variable to wait if another thread is already returning the delegation if nfs41_delegate_open() would conflict with a delegation, return it before sending the OPEN return the delegation before sending LINK, RENAME, REMOVE, and SETATTR all of this functionality is dependent on the preprocessor define DELEGATION_RETURN_ON_CONFLICT (on by default). if not defined, nfs41_delegation_return() is a noop Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
38259e0017
commit
bc6471d981
6 changed files with 179 additions and 19 deletions
|
|
@ -80,13 +80,22 @@ typedef struct __nfs41_server {
|
|||
LONG ref_count;
|
||||
} nfs41_server;
|
||||
|
||||
enum delegation_status {
|
||||
DELEGATION_GRANTED,
|
||||
DELEGATION_RETURNING,
|
||||
DELEGATION_RETURNED,
|
||||
};
|
||||
|
||||
typedef struct __nfs41_delegation_state {
|
||||
open_delegation4 state;
|
||||
nfs41_abs_path path;
|
||||
nfs41_path_fh file;
|
||||
struct list_entry client_entry; /* entry in nfs41_client.delegations */
|
||||
LONG ref_count;
|
||||
|
||||
enum delegation_status status;
|
||||
SRWLOCK lock;
|
||||
CONDITION_VARIABLE cond;
|
||||
} nfs41_delegation_state;
|
||||
|
||||
typedef struct __nfs41_lock_state {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue