]> git.karo-electronics.de Git - karo-tx-linux.git/commit
nvme: split nvme status from block req->errors
authorChristoph Hellwig <hch@lst.de>
Thu, 20 Apr 2017 14:02:57 +0000 (16:02 +0200)
committerJens Axboe <axboe@fb.com>
Thu, 20 Apr 2017 18:16:10 +0000 (12:16 -0600)
commit27fa9bc54541dabc3fabe1c520d342f5add0379b
treefb9cf187842b536005c0d7d61d09f8f46e3f322a
parentd663b69ff378e4990e35e274ab0813c4641ab564
nvme: split nvme status from block req->errors

We want our own clearly defined error field for NVMe passthrough commands,
and the request errors field is going away in its current form.

Just store the status and result field in the nvme_request field from
hardirq completion context (using a new helper) and then generate a
Linux errno for the block layer only when we actually need it.

Because we can't overload the status value with a negative error code
for cancelled command we now have a flags filed in struct nvme_request
that contains a bit for this condition.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/core.c
drivers/nvme/host/fc.c
drivers/nvme/host/lightnvm.c
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c
drivers/nvme/host/rdma.c
drivers/nvme/target/loop.c