]> git.baikalelectronics.ru Git - kernel.git/commit
NVMe: Move error handling to failed reset handler
authorKeith Busch <keith.busch@intel.com>
Wed, 24 Feb 2016 16:15:56 +0000 (09:15 -0700)
committerJens Axboe <axboe@fb.com>
Thu, 3 Mar 2016 21:42:50 +0000 (14:42 -0700)
commitfb6846409233dfd21bcd4f22a1fe73353d44e5d4
treec431aebc0a314c5f84604f4bf609482df5248938
parentbc7da2a7c5085afa81d3ed380eaf5dcc638313bb
NVMe: Move error handling to failed reset handler

This moves failed queue handling out of the namespace removal path and
into the reset failure path, fixing a hanging condition if the controller
fails or link down during del_gendisk. Previously the driver had to see
the controller as degraded prior to calling del_gendisk to setup the
queues to fail. But, if the controller happened to fail after this,
there was no task to end outstanding requests.

On failure, all namespace states are set to dead. This has capacity
revalidate to 0, and ends all new requests with error status.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-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/nvme.h
drivers/nvme/host/pci.c