SUNRPC: fix hang due to eventd deadlock...
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 14 Jun 2007 22:00:42 +0000 (18:00 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 11 Jul 2007 03:40:31 +0000 (23:40 -0400)
commitc1384c9c4c184543375b52a0997d06cd98145164
tree26bb2ee42dc2fddfe1817d3066844669912adef2
parent6e5b70e9d1e712d8dad5514e0ab5240ac4b5fb57
SUNRPC: fix hang due to eventd deadlock...

Brian Behlendorf writes:

The root cause of the NFS hang we were observing appears to be a rare
deadlock between the kernel provided usermodehelper API and the linux NFS
client.  The deadlock can arise because both of these services use the
generic linux work queues.  The usermodehelper API run the specified user
application in the context of the work queue.  And NFS submits both cleanup
and reconnect work to the generic work queue for handling.  Normally this
is fine but a deadlock can result in the following situation.

  - NFS client is in a disconnected state
  - [events/0] runs a usermodehelper app with an NFS dependent operation,
    this triggers an NFS reconnect.
  - NFS reconnect happens to be submitted to [events/0] work queue.
  - Deadlock, the [events/0] work queue will never process the
    reconnect because it is blocked on the previous NFS dependent
    operation which will not complete.`

The solution is simply to run reconnect requests on rpciod.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/xprt.c
net/sunrpc/xprtsock.c