xprtrdma: take HCA driver refcount at client
This is a rework of the following patch sent almost a year back:
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 <firstname.lastname@example.org>
Signed-off-by: Chuck Lever <email@example.com>
Reviewed-by: Sagi Grimberg <firstname.lastname@example.org>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
1 file changed