Spdk/test/unit/lib/bdev
Evgeniy Kochetov 6159c8c69b bdev: Fail nvme passthru command if not supported by bdev
The originally detected problem is that SPDK NVMf target fails command
with invalid opcode with status code INTERNAL_DEVICE_ERROR instead of
INVALID_OPCODE. All unknown commands on IO queue are passed to
underlying block device layer as NVME_IO type. It is not checked if
this type of commands is supported and, when command fails,
INTERNAL_DEVICE_ERROR is set as status code. If command fails on
submission, status code is set to INVALID_OPCODE which is more
relevant.

This patch adds check if command type is supported to
bdev_nvme_*_passthru functions. If not supported, it is failed with
ENOTSUP.

Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: I4d7f7639da17dd3b1dc3eee7eb1b4a4f876117a2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8567
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2022-06-30 13:32:28 -04:00
..
bdev_zone.c spelling: test 2022-06-30 13:32:28 -04:00
bdev.c bdev: Fail nvme passthru command if not supported by bdev 2022-06-30 13:32:28 -04:00
compress.c test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
crypto.c spelling: test 2022-06-30 13:32:28 -04:00
gpt test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
mt spelling: test 2022-06-30 13:32:28 -04:00
nvme spelling: test 2022-06-30 13:32:28 -04:00
part.c test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
pmem lib/bdev: added spdk_bdev_module_fini_done() 2021-08-23 08:49:56 +00:00
raid test/unit/raid: fix set-but-not-used error 2022-06-30 13:32:27 -04:00
scsi_nvme.c test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
vbdev_lvol.c bdev/lvol: unload empty lvs during fini_start 2021-08-23 08:49:56 +00:00
vbdev_zone_block.c test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
Makefile ut/bdev_ocssd: Move bdev_ocssd_ut from bdev directory to bdev/nvme directory 2021-02-09 11:29:53 +00:00