Skip to content

Commit

Permalink
nfs41: Invoke RECLAIM_COMPLETE on all new client ids
Browse files Browse the repository at this point in the history
The NFSv4.1 spec indicates RECLAIM_COMPLETE is to be issued
whenever a client establishes a new client id, not only after
detecting the server has rebooted.

Set the NFS4CLNT_RECLAIM_REBOOT bit after every new client id has
been established.  This enables us to issue RECLAIM_COMPLETE
during the wrap up of the NFS4CLNT_RECLAIM_REBOOT state.

Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Ricardo Labiaga authored and Trond Myklebust committed Dec 8, 2009
1 parent 88069f7 commit 7cab89b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fs/nfs/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1095,12 +1095,12 @@ static void nfs4_state_end_reclaim_reboot(struct nfs_client *clp)
struct rb_node *pos;
struct nfs4_state *state;

nfs4_reclaim_complete(clp,
nfs4_reboot_recovery_ops[clp->cl_minorversion]);

if (!test_and_clear_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state))
return;

nfs4_reclaim_complete(clp,
nfs4_reboot_recovery_ops[clp->cl_minorversion]);

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);
spin_lock(&sp->so_lock);
Expand Down Expand Up @@ -1335,6 +1335,7 @@ static void nfs4_state_manager(struct nfs_client *clp)
goto out_error;
}
clear_bit(NFS4CLNT_CHECK_LEASE, &clp->cl_state);
set_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state);
}

if (test_and_clear_bit(NFS4CLNT_CHECK_LEASE, &clp->cl_state)) {
Expand Down

0 comments on commit 7cab89b

Please sign in to comment.