]> git.baikalelectronics.ru Git - kernel.git/commit
NVMe: Retry failed commands with non-fatal errors
authorKeith Busch <keith.busch@intel.com>
Thu, 3 Apr 2014 22:45:23 +0000 (16:45 -0600)
committerMatthew Wilcox <matthew.r.wilcox@intel.com>
Thu, 10 Apr 2014 21:11:59 +0000 (17:11 -0400)
commit91dd16e2deaea5982ea9d5fb179eb7cb22d49ec0
tree870dc908379694e20ea319ba11c81bec5864cef7
parent3fdd2193f1d774015bbde97cee878d02a6d24b79
NVMe: Retry failed commands with non-fatal errors

For commands returned with failed status, queue these for resubmission
and continue retrying them until success or for a limited amount of
time. The final timeout was arbitrarily chosen so requests can't be
retried indefinitely.

Since these are requeued on the nvmeq that submitted the command, the
callbacks have to take an nvmeq instead of an nvme_dev as a parameter
so that we can use the locked queue to append the iod to retry later.

The nvme_iod conviently can be used to track how long we've been trying
to successfully complete an iod request. The nvme_iod also provides the
nvme prp dma mappings, so I had to move a few things around so we can
keep those mappings.

Signed-off-by: Keith Busch <keith.busch@intel.com>
[fixed checkpatch issue with long line]
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
drivers/block/nvme-core.c
drivers/block/nvme-scsi.c
include/linux/nvme.h
include/uapi/linux/nvme.h