]> 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)
commitba8b341e5a3e0093e4f5714d1e06400c89289b5b
tree41ba3ca8dd0c5c15944255b6c6c783580c811c2e
parent46dc26b7db81c6e51c769de62f6d365b04f0771f
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