Spdk/lib/nvme
Shuhei Matsumoto 576a373d58 lib/nvme: Abort queued requests whose cb_arg matches
Use another list dedicated to hold queued requests being aborted
to avoid potential infinite recursive calls.

Add a helper function nvme_qpair_abort_queued_req() to move requests
whose cb_arg matches from qpair->queued_req to qpair->aborted_queued_req.
Then nvme_qpair_resubmit_requests() aborts all requests in
qpair->aborted_queued_req.

The first idea was that nvme_qpair_abort_queued_req() aborts queued
requests directly. However, this caused infinite recursive calls.
Hence separate requesting abort to queued requests and actually
aborting queued requests.

The detail of the infinite recursive calls is as follows:

Some SPDK tool submits the next request from the callback to the completion
of a request in the completion polling loop. For such tool, if the callback
submits a request and then aborts the request immediately, and the request
could not be submitted but queued, it will create infinite recursive calls
by request submit and abort, and it will not be able to get out of
completion polling loop.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8196182b981bc52dee2074d7642498a5d6ef97d4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2891
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-13 08:40:42 +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 nvme: fix timeout log during ctrlr state change 2020-07-08 07:54:29 +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: Abort queued requests whose cb_arg matches 2020-07-13 08:40:42 +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 lib/nvme: Add qpair_iterate_requests() to iterate the common operation among transports 2020-07-08 07:54:01 +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: Abort queued requests whose cb_arg matches 2020-07-13 08:40:42 +00:00
nvme_quirks.c nvme: add security send/receive quirk for Intel 900P SSDs 2020-07-03 07:31:20 +00:00
nvme_rdma.c lib/nvme: Add qpair_iterate_requests() to iterate the common operation among transports 2020-07-08 07:54:01 +00:00
nvme_tcp.c nvme/tcp: Insert free req at the head of the list 2020-07-13 08:40:31 +00:00
nvme_transport.c lib/nvme: Add qpair_iterate_requests() to iterate the common operation among transports 2020-07-08 07:54:01 +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: introduce new set of cmd/cpl printers 2020-07-10 07:30:59 +00:00