Spdk/lib/nvme
Shuhei Matsumoto a57aeac1fe nvme/rdma: Dequeue request from outstanding list before calling completion
Each request has a callback context as cb_arg, and the callback to
nvme_complete_request() for the completed request may reuse the context
to the new request.

On the other hand, RDMA transport dequeues rdma_req from
rqpair->outstanding_reqs after calling nvme_complete_request() for
the request pointed by rdma_req.

Hence while nvme_complete_request() is executed, rqpair->outstanding_reqs
may have two requests which has the same callback context, the
completed request and the new submitted request.

The upcoming patch will search all requests whose cb_arg matches to
abort them. In the above case, the search may find two requests by
mistake.

To avoid such error, move dequeueing rdma_req from rqpair->outstanding_reqs
before calling nvme_request_complete().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia183733f4a4cd4f85de17514ef3a884693910a05
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2863
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-24 08:19:43 +00:00
..
Makefile mk/nvme/nvmf: Add deps for RDMA libs 2020-06-18 07:28:04 +00:00
nvme_ctrlr_cmd.c lib/nvme: Get ctrlr simply from req->qpair->ctrlr at spdk_nvme_ctrlr_cmd_abort() 2020-06-24 08:19:43 +00:00
nvme_ctrlr_ocssd_cmd.c ocssd: hold lock when calling nvme_ctrlr_submit_admin_request 2019-02-15 21:27:58 +00:00
nvme_ctrlr.c lib/nvme: Fix aborting queued abort requests at controller reset or destruct 2020-06-24 08:19:43 +00:00
nvme_cuse.c lib/nvme: update io msg producers on ns manage 2020-06-05 09:01:44 +00:00
nvme_cuse.h lib/nvme: add RPC for interacting with CUSE devices 2019-10-24 23:43:59 +00:00
nvme_fabric.c lib/nvme: remove spdk prefix from internal headers. 2020-06-01 13:07:30 +00:00
nvme_internal.h lib/nvme: remove spdk prefix from internal headers. 2020-06-01 13:07:30 +00:00
nvme_io_msg.c lib/nvme: update io msg producers on ns manage 2020-06-05 09:01:44 +00:00
nvme_io_msg.h lib/nvme: update io msg producers on ns manage 2020-06-05 09:01:44 +00:00
nvme_ns_cmd.c lib: net, notify, nvme, rocksdb remove spdk_ prefix. 2020-05-21 09:19:00 +00:00
nvme_ns_ocssd_cmd.c nvme: save separate metadata size to nvme request 2020-04-02 07:02:38 +00:00
nvme_ns.c lib/nvme: remove spdk prefix from internal headers. 2020-06-01 13:07:30 +00:00
nvme_opal_internal.h nvme/opal: deprecate spdk_opal_supported() 2020-05-20 14:16:44 +00:00
nvme_opal.c lib/nvme: Remove inclusion of SPDK event library 2020-06-01 09:20:41 +00:00
nvme_pcie.c nvme/pcie: Dequeue request from outstanding list before calling completion 2020-06-24 08:19:43 +00:00
nvme_poll_group.c lib/nvme: switch poll group to use connect/disconnect semantics. 2020-04-22 19:06:26 +00:00
nvme_qpair.c lib/nvme: Set the parent to failure when submission of any children failed 2020-06-24 08:19:43 +00:00
nvme_quirks.c nvme: add a quirk for QEMU emulated NVMe SSD 2020-05-20 14:16:52 +00:00
nvme_rdma.c nvme/rdma: Dequeue request from outstanding list before calling completion 2020-06-24 08:19:43 +00:00
nvme_tcp.c nvme/tcp: Fix nvme_tcp_req free conflict between cmd sending and incoming pdu receiving 2020-06-22 07:47:31 +00:00
nvme_transport.c lib/nvme: rdma poll group with shared cq. 2020-06-04 07:20:16 +00:00
nvme_uevent.c lib/nvme: remove spdk prefix from internal headers. 2020-06-01 13:07:30 +00:00
nvme_uevent.h lib/nvme: remove spdk prefix from internal headers. 2020-06-01 13:07:30 +00:00
nvme.c nvme: solve the spdk_nvme_connect compatibilty issue. 2020-06-05 09:04:11 +00:00
spdk_nvme.map nvme/cuse: add spdk_nvme_cuse_update api 2020-06-05 09:01:44 +00:00