RE: [PATCH 0/12] Fix session reset deadlocks Version 4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2009-12-04 at 23:05 -0800, Labiaga, Ricardo wrote: 
> I'm seeing a problem with the bits in the nfs-for-next branch when I run
> v4.1.  If a bad session is received after a server reboot, the client
> issues a flood of sequence requests.  The sequence RPCs contain the last
> sequenceID from the previous session with the new sessionID.  This is
> repeated over and over until you ctrl-C the triggering process.  The
> server replies with sequence misordered, but the client issues the exact
> same RPC over and over.
> 
> Also to note is that right after the session is destroyed, the client
> will issue sequence requests with sessionID of 0 right before the create
> session succeeds.

That would indicate a bug in the NFS4CLNT_SESSION_DRAINING code.

OK. I think I see what it is...

Could you try this?

Cheers
  Trond
---------------------------------------------------------------------------- 
NFSv41: nfs4_reset_session must always set NFS4CLNT_SESSION_DRAINING

From: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>

Otherwise we have no guarantees that other processes won't start another
RPC call while we're resetting the session.

Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>
---

 fs/nfs/nfs4state.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index a86f3ac..bc4ca6f 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1211,8 +1211,8 @@ static int nfs4_reset_session(struct nfs_client *clp)
 
 	INIT_COMPLETION(ses->complete);
 	spin_lock(&tbl->slot_tbl_lock);
+	set_bit(NFS4CLNT_SESSION_DRAINING, &clp->cl_state);
 	if (tbl->highest_used_slotid != -1) {
-		set_bit(NFS4CLNT_SESSION_DRAINING, &clp->cl_state);
 		spin_unlock(&tbl->slot_tbl_lock);
 		status = wait_for_completion_interruptible(&ses->complete);
 		if (status) /* -ERESTARTSYS */

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux