Spdk/module/bdev/nvme
Shuhei Matsumoto 47b0d4275c bdev/nvme: Support abort IO by using spdk_nvme_ctrlr_cmd_abort_ext()
Change NVMe bdev module to enable abort as IO type.

Change _bdev_nvme_submit_request() to process abort request when the
IO type is abort.

The current thread tries aborting I/O command in the I/O qpair first.
If no I/O command to abort was found, send message to the thread which
is registered when creating controller. The controller thread tries
aborting admin command in the admin qpair next. If no admin command
to abort was found, complete the abort request with failure.

spdk_nvme_ctrlr_cmd_abort_ext() is used to try aborting command whose
cb_arg matches. qpair is set to NULL when trying to abort admin command.

Before calling spdk_nvme_ctrlr_cmd_abort_ext(), save the current
thread to process admin command completion correctly.

spdk_bdev_abort() supports any bdev module other than NVMe bdev
module and does not check CDW0 but checks only if the completion
status is success or failure. So add bdev_nvme_abort_done() and
converts the NVMe completion status to the bdev completion status.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If6aebae0ba2f6c5834ee926e161af9c4d825f341
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2040
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-14 07:54:42 +00:00
..
bdev_nvme_cuse_rpc.c module/bdev_nvme: remove spdk prefix from static/internal functions. 2020-05-15 07:58:03 +00:00
bdev_nvme_rpc.c bdev/nvme: make the controller trid a pointer. 2020-06-22 10:13:29 +00:00
bdev_nvme.c bdev/nvme: Support abort IO by using spdk_nvme_ctrlr_cmd_abort_ext() 2020-07-14 07:54:42 +00:00
bdev_nvme.h Revert "bdev/nvme: add a function for specifying a multipath trid." 2020-07-08 07:57:11 +00:00
bdev_ocssd_rpc.c bdev/ocssd: fixed leaking range buffer 2019-12-23 08:43:34 +00:00
bdev_ocssd.c pollers: Fix pollers to return correct busy status 2020-07-07 07:29:31 +00:00
bdev_ocssd.h bdev/ocssd: media management events 2019-12-20 10:02:15 +00:00
common.c Revert "bdev/nvme: add a function for specifying a multipath trid." 2020-07-08 07:57:11 +00:00
common.h bdev/nvme: Add thread pointer to struct nvme_bdev_ctrlr 2020-07-14 07:54:42 +00:00
Makefile mk/lib: add a check that major and minor version is set for libs. 2020-05-21 09:19:00 +00:00
nvme_rpc.c module/bdev_nvme: remove spdk prefix from static/internal functions. 2020-05-15 07:58:03 +00:00
vbdev_opal_rpc.c nvme/opal: deprecate spdk_opal_supported() 2020-05-20 14:16:44 +00:00
vbdev_opal.c bdev_nvme/opal: remove unnecessary opal configuration 2020-07-01 07:50:59 +00:00
vbdev_opal.h module/bdev_nvme: remove spdk prefix from static/internal functions. 2020-05-15 07:58:03 +00:00