NFSv4: Fix a BAD_SEQUENCEID condition.
We really shouldn't be resetting the sequence ids when doing state expiration recovery, since we don't know if the server still remembers our previous state owners. There are servers out there that do attempt to preserve client state even if the lease has expired. Such a server would only release that state if a conflicting OPEN request occurs. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
f3c76491e7
commit
0d62f85a81
1 changed files with 0 additions and 2 deletions
|
@ -951,7 +951,6 @@ static void nfs4_clear_open_state(struct nfs4_state *state)
|
||||||
clear_bit(NFS_O_WRONLY_STATE, &state->flags);
|
clear_bit(NFS_O_WRONLY_STATE, &state->flags);
|
||||||
clear_bit(NFS_O_RDWR_STATE, &state->flags);
|
clear_bit(NFS_O_RDWR_STATE, &state->flags);
|
||||||
list_for_each_entry(lock, &state->lock_states, ls_locks) {
|
list_for_each_entry(lock, &state->lock_states, ls_locks) {
|
||||||
lock->ls_seqid.counter = 0;
|
|
||||||
lock->ls_seqid.flags = 0;
|
lock->ls_seqid.flags = 0;
|
||||||
lock->ls_flags &= ~NFS_LOCK_INITIALIZED;
|
lock->ls_flags &= ~NFS_LOCK_INITIALIZED;
|
||||||
}
|
}
|
||||||
|
@ -966,7 +965,6 @@ static void nfs4_state_mark_reclaim_helper(struct nfs_client *clp, int (*mark_re
|
||||||
/* Reset all sequence ids to zero */
|
/* Reset all sequence ids to zero */
|
||||||
for (pos = rb_first(&clp->cl_state_owners); pos != NULL; pos = rb_next(pos)) {
|
for (pos = rb_first(&clp->cl_state_owners); pos != NULL; pos = rb_next(pos)) {
|
||||||
sp = rb_entry(pos, struct nfs4_state_owner, so_client_node);
|
sp = rb_entry(pos, struct nfs4_state_owner, so_client_node);
|
||||||
sp->so_seqid.counter = 0;
|
|
||||||
sp->so_seqid.flags = 0;
|
sp->so_seqid.flags = 0;
|
||||||
spin_lock(&sp->so_lock);
|
spin_lock(&sp->so_lock);
|
||||||
list_for_each_entry(state, &sp->so_states, open_states) {
|
list_for_each_entry(state, &sp->so_states, open_states) {
|
||||||
|
|
Reference in a new issue