Re: [BUG] nfs client stuck in D state in linux 2.4.17 - 2.4.21-pre5

Trond Myklebust (trond.myklebust@fys.uio.no)
Tue, 13 May 2003 23:11:45 +0200


>>>>> " " == Vladimir Serov <vserov@infratel.com> writes:

>>
>> Looks like there is a hanging GETATTR call from another process
>> that is blocking your process.
>>
>> Which procedure does c00f17b8 correspond to?
>>
> from the System.map :

> c00f17b8 t call_status

OK. Looks as if the process isn't being woken up in
rpc_execute(). Does the following make any difference?

Cheers,
Trond

--- linux-2.4.21-up/include/linux/sunrpc/sched.h.orig 2003-05-13 17:51:59.000000000 +0200
+++ linux-2.4.21-up/include/linux/sunrpc/sched.h 2003-05-13 23:04:44.000000000 +0200
@@ -128,7 +128,12 @@
#define RPC_IS_RUNNING(t) (test_bit(RPC_TASK_RUNNING, &(t)->tk_runstate))

#define rpc_set_running(t) (set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate))
-#define rpc_clear_running(t) (clear_bit(RPC_TASK_RUNNING, &(t)->tk_runstate))
+#define rpc_clear_running(t) \
+ do { \
+ smp_mb__before_clear_bit(); \
+ clear_bit(RPC_TASK_RUNNING, &(t)->tk_runstate); \
+ smp_mb__after_clear_bit(); \
+ } while(0)

#define rpc_set_sleeping(t) (set_bit(RPC_TASK_SLEEPING, &(t)->tk_runstate))

--- linux-2.4.21-up/include/linux/sunrpc/xprt.h.orig 2003-05-13 17:51:59.000000000 +0200
+++ linux-2.4.21-up/include/linux/sunrpc/xprt.h 2003-05-13 23:06:41.000000000 +0200
@@ -200,7 +200,12 @@
#define xprt_connected(xp) (test_bit(XPRT_CONNECT, &(xp)->sockstate))
#define xprt_set_connected(xp) (set_bit(XPRT_CONNECT, &(xp)->sockstate))
#define xprt_test_and_set_connected(xp) (test_and_set_bit(XPRT_CONNECT, &(xp)->sockstate))
-#define xprt_clear_connected(xp) (clear_bit(XPRT_CONNECT, &(xp)->sockstate))
+#define xprt_clear_connected(xp) \
+ do { \
+ smp_mb__before_clear_bit(); \
+ clear_bit(XPRT_CONNECT, &(xp)->sockstate); \
+ smp_mb__after_clear_bit(); \
+ } while(0)

#endif /* __KERNEL__*/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/