recovery: use normal OPEN/LOCK on ERR_NO_GRACE
if we see NFS4ERR_NO_GRACE from recovery operations, it means we lost our state due to a lease expiration rather than a server reboot. in this case, it's possible that conflicting locks were granted to other clients, so we have to try normal OPEN/LOCK operations to recover our state. because they're sent during recovery, nfs41_open() and nfs41_lock() take a new 'bool_t try_recovery' argument so we can avoid recursion if these operations fail due to conflicting locks, we have no choice but to return errors to the application. using a stateid that was revoked due to lease expiration results in NFS4ERR_EXPIRED, and we map this error to ERROR_FILE_INVALID: The volume for a file has been externally altered so that the opened file is no longer valid. Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
222c1bf020
commit
0a309c4350
8 changed files with 46 additions and 17 deletions
|
|
@ -440,7 +440,7 @@ static int handle_open(nfs41_upcall *upcall)
|
|||
args->created = status == NFS4_OK ? TRUE : FALSE;
|
||||
} else {
|
||||
status = nfs41_open(state->session, state->share_access,
|
||||
state->share_deny, create, args->mode, state, &info);
|
||||
state->share_deny, create, args->mode, TRUE, state, &info);
|
||||
|
||||
if (status == NFS4_OK) {
|
||||
/* add to the client's list of state for recovery */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue