]> git.baikalelectronics.ru Git - kernel.git/commit
xprtrdma: Fix FRWR invalidation error recovery
authorChuck Lever <chuck.lever@oracle.com>
Thu, 8 Jun 2017 15:52:28 +0000 (11:52 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 13 Jul 2017 20:00:11 +0000 (16:00 -0400)
commit0d335ae957d8243c5d96881985b0638dee16bc8a
tree77c8d53c61b7b9cea0bc6891648ea405a33c230a
parent936fc9152c752ffaa5c1f24d8a6001c71447fc07
xprtrdma: Fix FRWR invalidation error recovery

When ib_post_send() fails, all LOCAL_INV WRs past @bad_wr have to be
examined, and the MRs reset by hand.

I'm not sure how the existing code can work by comparing R_keys.
Restructure the logic so that instead it walks the chain of WRs,
starting from the first bad one.

Make sure to wait for completion if at least one WR was actually
posted. Otherwise, if the ib_post_send fails, we can end up
DMA-unmapping the MR while LOCAL_INV operations are in flight.

Commit 175007f3fc45 ("xprtrdma: Honor ->send_request API contract")
added the rdma_disconnect() call site. The disconnect actually
causes more problems than it solves, and SQ overruns happen only as
a result of software bugs. So remove it.

Fixes: 5c2f759e3ada ("xprtrdma: Reset MRs in frwr_op_unmap_sync()")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/frwr_ops.c