]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: use return value from blk_execute_rq()
authorKeith Busch <kbusch@kernel.org>
Thu, 10 Jun 2021 21:44:37 +0000 (14:44 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 30 Jun 2021 21:35:45 +0000 (15:35 -0600)
commit91788f99c8b4a505d33a5097f4c4d9c7f58efee1
tree41ba3ca8dd0c5c15944255b6c6c783580c811c2e
parent96afa5b70254d3c7cf6e2af93f49640747e9adb7
nvme: use return value from blk_execute_rq()

We don't have an nvme status to report if the driver's .queue_rq()
returns an error without dispatching the requested nvme command. Check
the return value from blk_execute_rq() for all passthrough commands so
the caller may know their command was not successful.

If the command is from the target passthrough interface and fails to
dispatch, synthesize the response back to the host as a internal target
error.

Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Link: https://lore.kernel.org/r/20210610214437.641245-5-kbusch@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c
drivers/nvme/host/ioctl.c
drivers/nvme/host/nvme.h
drivers/nvme/target/passthru.c