linux/net/sunrpc/xprtrdma
Chuck Lever 91a10c5297 xprtrdma: Use same device when mapping or syncing DMA buffers
When the underlying device driver is reloaded, ia->ri_device will be
replaced. All cached copies of that device pointer have to be
updated as well.

Commit 54cbd6b0c6 ("xprtrdma: Delay DMA mapping Send and Receive
buffers") added the rg_device field to each regbuf. As part of
handling a device removal, rpcrdma_dma_unmap_regbuf is invoked on
all regbufs for a transport.

Simply calling rpcrdma_dma_map_regbuf for each Receive buffer after
the driver has been reloaded should reinitialize rg_device correctly
for every case except rpcrdma_wc_receive, which still uses
rpcrdma_rep::rr_device.

Ensure the same device that was used to map a Receive buffer is also
used to sync it in rpcrdma_wc_receive by using rg_device there
instead of rr_device.

This is the only use of rr_device, so it can be removed.

The use of regbufs in the send path is also updated, for
completeness.

Fixes: 54cbd6b0c6 ("xprtrdma: Delay DMA mapping Send and ... ")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2017-04-25 16:12:22 -04:00
..
backchannel.c
fmr_ops.c xprtrdma: Refactor management of mw_list field 2017-02-10 14:02:37 -05:00
frwr_ops.c xprtrdma: Refactor management of mw_list field 2017-02-10 14:02:37 -05:00
Makefile
module.c
rpc_rdma.c xprtrdma: Use same device when mapping or syncing DMA buffers 2017-04-25 16:12:22 -04:00
svc_rdma_backchannel.c The nfsd update this round is mainly a lot of miscellaneous cleanups and 2017-02-28 15:39:09 -08:00
svc_rdma_marshal.c svcrdma: Clean up RPC-over-RDMA Call header decoder 2017-02-08 14:41:57 -05:00
svc_rdma_recvfrom.c svcrdma: Poll CQs in "workqueue" mode 2017-02-08 14:42:01 -05:00
svc_rdma_sendto.c svcrdma: Clean up RPC-over-RDMA Reply header encoder 2017-02-08 14:41:41 -05:00
svc_rdma_transport.c svcrdma: set XPT_CONG_CTRL flag for bc xprt 2017-03-28 21:25:55 -04:00
svc_rdma.c
transport.c xprtrdma: Refactor rpcrdma_ia_open() 2017-04-25 16:12:20 -04:00
verbs.c xprtrdma: Use same device when mapping or syncing DMA buffers 2017-04-25 16:12:22 -04:00
xprt_rdma.h xprtrdma: Use same device when mapping or syncing DMA buffers 2017-04-25 16:12:22 -04:00