nvmf/rdma: Clear num_outstanding_data_wr to zero when read I/O to the controller failed
When read I/O to the controller failed, clear rdma_req->num_outstanding_data_wr to zero to avoid rqpair->current_send_depth goes to negative after completing data transfer to the host. This bug was apparent when the outstanding read I/O was aborted. Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com> Signed-off-by: Ben Walker <benjamin.walker@intel.com> Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I62e439f946ef81ea0b5de5280670ed97fe8d977f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2341 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
This commit is contained in:
parent
af61ab90c7
commit
e0cd084bcb
@ -1114,8 +1114,12 @@ request_transfer_out(struct spdk_nvmf_request *req, int *data_posted)
|
||||
*/
|
||||
first = &rdma_req->rsp.wr;
|
||||
|
||||
if (rsp->status.sc == SPDK_NVME_SC_SUCCESS &&
|
||||
req->xfer == SPDK_NVME_DATA_CONTROLLER_TO_HOST) {
|
||||
if (rsp->status.sc != SPDK_NVME_SC_SUCCESS) {
|
||||
/* On failure, data was not read from the controller. So clear the
|
||||
* number of outstanding data WRs to zero.
|
||||
*/
|
||||
rdma_req->num_outstanding_data_wr = 0;
|
||||
} else if (req->xfer == SPDK_NVME_DATA_CONTROLLER_TO_HOST) {
|
||||
first = &rdma_req->data.wr;
|
||||
*data_posted = 1;
|
||||
num_outstanding_data_wr = rdma_req->num_outstanding_data_wr;
|
||||
|
Loading…
Reference in New Issue
Block a user