Skip to contentSkip to conversation

NFS/RDMA client stall patches

PATCH Peter Leckie 2 participants 2 messages May 19, 2008 – Jun 10, 2008

Subsystems (3)
lore
Share & tools
lore

Peter Leckie

author Reviewed-by Greg Banks
#0 lore raw

Drain both the sending and resend queues on disconnect. This prevents the client from getting it's self into a dead state when the server disconnects us.

X-Sgi-Pv: 971446
<http://bugworks/query.cgi/971446>---

net/sunrpc/xprt.c +2 -0
Index: linux-2.6.25.3/net/sunrpc/xprt.c
===================================================================
@@ -586,6 +586,8 @@ void xprt_disconnect_done(struct rpc_xpr
       spin_lock_bh(&xprt->transport_lock);
       xprt_clear_connected(xprt);
       xprt_wake_pending_tasks(xprt, -ENOTCONN);
+       rpc_wake_up_status(&xprt->resend, -ENOTCONN);
+       rpc_wake_up_status(&xprt->sending, -ENOTCONN);
       spin_unlock_bh(&xprt->transport_lock);

}
EXPORT_SYMBOL_GPL(xprt_disconnect_done);

#1 lore raw
Quoted 13 lines · Peter Leckie

Drain both the sending and resend queues on disconnect. This prevents the client from getting it's self into a dead state when the server disconnects us.

X-Sgi-Pv: 971446
<http://bugworks/query.cgi/971446>---
Index: linux-2.6.25.3/net/sunrpc/xprt.c
===================================================================

net/sunrpc/xprt.c void xprt_disconnect_done(struct rpc_xpr · line 593

Quoted 8 lines
net/sunrpc/xprt.c +2 -0
@@ -586,6 +586,8 @@ void xprt_disconnect_done(struct rpc_xpr
        spin_lock_bh(&xprt->transport_lock);
        xprt_clear_connected(xprt);
        xprt_wake_pending_tasks(xprt, -ENOTCONN);
+       rpc_wake_up_status(&xprt->resend, -ENOTCONN);
+       rpc_wake_up_status(&xprt->sending, -ENOTCONN);
        spin_unlock_bh(&xprt->transport_lock);
 }
 EXPORT_SYMBOL_GPL(xprt_disconnect_done);

What kind of a deadlock? The tasks on these queues should be waiting for the XPRT_LOCKED bit. Why would the change in connection status change anything to that?

Trond