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 14:20:23 +0000 (08:20 -0600)
commitdca580c99656a7684b65ac31356940586e5da482
tree1c568fcaad6240ca9e4c5f0be560889d60f3e18a
parent352b30f6150a50f6c22f0ad1b571ae4bf9992029
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