]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xprtrdma: take HCA driver refcount at client
authorDevesh Sharma <devesh.sharma@avagotech.com>
Thu, 30 Jul 2015 11:00:18 +0000 (16:30 +0530)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 31 Aug 2015 20:46:00 +0000 (14:46 -0600)
commita02b0f8d2b31e5b997aaa95089ec618fef90efbe
tree383c9f50d3c4b382e37345b401d86e10a14b41ae
parent355d972a47bfc18f2c7944d9728fd2d1ca24284f
xprtrdma: take HCA driver refcount at client

[ Queued for upstream v4.3 ]

This is a rework of the following patch sent almost a year back:
http://www.mail-archive.com/linux-rdma%40vger.kernel.org/msg20730.html

In presence of active mount if someone tries to rmmod vendor-driver, the
command remains stuck forever waiting for destruction of all rdma-cm-id.
in worst case client can crash during shutdown with active mounts.

The existing code assumes that ia->ri_id->device cannot change during
the lifetime of a transport. xprtrdma do not have support for
DEVICE_REMOVAL event either. Lifting that assumption and adding support
for DEVICE_REMOVAL event is a long chain of work, and is in plan.

The community decided that preventing the hang right now is more
important than waiting for architectural changes.

Thus, this patch introduces a temporary workaround to acquire HCA driver
module reference count during the mount of a nfs-rdma mount point.

Signed-off-by: Devesh Sharma <devesh.sharma@avagotech.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Sagi Grimberg <sagig@dev.mellanox.co.il>
net/sunrpc/xprtrdma/verbs.c