Spdk/lib
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
..
accel spelling: lib 2022-06-30 13:32:28 -04:00
bdev bdev: Fail nvme passthru command if not supported by bdev 2022-06-30 13:32:28 -04:00
blob spelling: lib 2022-06-30 13:32:28 -04:00
blobfs trace: move all trace definitions to a separate file 2022-06-30 13:32:26 -04:00
conf so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
dma dma: Add infrstructure for push operation 2022-06-30 13:32:26 -04:00
env_dpdk spelling: lib 2022-06-30 13:32:28 -04:00
env_ocf spelling: lib 2022-06-30 13:32:28 -04:00
event spelling: lib 2022-06-30 13:32:28 -04:00
ftl spelling: lib 2022-06-30 13:32:28 -04:00
idxd spelling: lib 2022-06-30 13:32:28 -04:00
init spelling: lib 2022-06-30 13:32:28 -04:00
ioat ioat: fix potential double free problem in ioat_channel_start() 2021-06-16 09:00:37 +00:00
iscsi spelling: lib 2022-06-30 13:32:28 -04:00
json json: add the spdk_json_write_uint8|16 function 2022-06-30 13:32:26 -04:00
jsonrpc spelling: lib 2022-06-30 13:32:28 -04:00
log log: add an API to return syslog level based on SPDK's log level 2021-08-12 12:57:39 +00:00
lvol spelling: lib 2022-06-30 13:32:28 -04:00
nbd spelling: lib 2022-06-30 13:32:28 -04:00
notify so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
nvme spelling: lib 2022-06-30 13:32:28 -04:00
nvmf spelling: lib 2022-06-30 13:32:28 -04:00
rdma rdma: Set REMOTE_WRITE permission for iWARP on target side 2022-06-30 13:32:28 -04:00
reduce spelling: lib 2022-06-30 13:32:28 -04:00
rocksdb rocksdb: fix thread name typo 2021-09-03 08:08:20 +00:00
rpc Initial changes. 2022-02-08 15:51:30 -05:00
scsi spelling: lib 2022-06-30 13:32:28 -04:00
sock lib/sock: create common lookup for spdk_sock_group_impl 2022-06-30 13:32:28 -04:00
thread spelling: lib 2022-06-30 13:32:28 -04:00
trace trace: enable adding relations between traces 2022-06-30 13:32:26 -04:00
trace_parser spelling: lib 2022-06-30 13:32:28 -04:00
ut_mock so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
util spelling: lib 2022-06-30 13:32:28 -04:00
vfio_user spelling: lib 2022-06-30 13:32:28 -04:00
vhost spelling: lib 2022-06-30 13:32:28 -04:00
virtio spelling: lib 2022-06-30 13:32:28 -04:00
vmd spelling: lib 2022-06-30 13:32:28 -04:00
Makefile lib/trace_parser: add trace_parser library stubs 2022-06-30 13:32:25 -04:00