]> www.infradead.org Git - users/jedix/linux-maple.git/commit
NVMe: IO ending fixes on surprise removal
authorKeith Busch <keith.busch@intel.com>
Fri, 11 Dec 2015 20:14:28 +0000 (13:14 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 6 Jul 2016 23:32:08 +0000 (16:32 -0700)
commit76093b32a3c4a4e7293dac2aae85c3ef5bd2716f
tree3296fd0067bfa91dd2458d95412f2262197e8084
parent68868cef7e3abdf1430649eafadd4ab6c80ab413
NVMe: IO ending fixes on surprise removal

This patch fixes a lost request discovered during IO + hot removal.

The driver's pci removal deletes gendisks prior to shutting down the
controller to allow dirty data to sync. Dirty data can not be synced on
a surprise removal, though, and would potentially block indefinitely.

The driver previously had marked the queue as dying in this scenario
to prevent new requests from attempting, however it will still block
for requests that already entered the queue. This patch fixes this by
quiescing IO first, then aborting the requeued requests before deleting
disks.

Reported-by: Sujith Pandel <sujith_pandel@dell.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Tested-by: Sujith Pandel <sujith_pandel@dell.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
(cherry picked from commit b5875222de2fb91339db79a753677ba4f68120d0)

Orabug: 22620486
Signed-off-by: Jason Luo <zhangqing.luo@oracle.com>
Conflicts:
drivers/nvme/host/pci.c
drivers/nvme/host/pci.c