]> Git Repo - linux.git/commit
nvme: cancel pending I/O if nvme controller is in terminal state
authorNilay Shroff <[email protected]>
Thu, 25 Apr 2024 14:03:00 +0000 (19:33 +0530)
committerKeith Busch <[email protected]>
Wed, 1 May 2024 09:58:42 +0000 (02:58 -0700)
commit25bb3534ee21e39eb9301c4edd7182eb83cb0d07
tree5ae73be06b823123055492e1ec7ec72b27b641e4
parent445f9119e70368ccc964575c2a6d3176966a9d65
nvme: cancel pending I/O if nvme controller is in terminal state

While I/O is running, if the pci bus error occurs then
in-flight I/O can not complete. Worst, if at this time,
user (logically) hot-unplug the nvme disk then the
nvme_remove() code path can't forward progress until
in-flight I/O is cancelled. So these sequence of events
may potentially hang hot-unplug code path indefinitely.
This patch helps cancel the pending/in-flight I/O from the
nvme request timeout handler in case the nvme controller
is in the terminal (DEAD/DELETING/DELETING_NOIO) state and
that helps nvme_remove() code path forward progress and
finish successfully.

Link: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Nilay Shroff <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Signed-off-by: Keith Busch <[email protected]>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c
This page took 0.052698 seconds and 4 git commands to generate.