File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -3933,6 +3933,12 @@ void nvme_remove_namespaces(struct nvme_ctrl *ctrl)
3933
3933
*/
3934
3934
nvme_mpath_clear_ctrl_paths (ctrl );
3935
3935
3936
+ /*
3937
+ * Unquiesce io queues so any pending IO won't hang, especially
3938
+ * those submitted from scan work
3939
+ */
3940
+ nvme_unquiesce_io_queues (ctrl );
3941
+
3936
3942
/* prevent racing with ns scanning */
3937
3943
flush_work (& ctrl -> scan_work );
3938
3944
@@ -3942,10 +3948,8 @@ void nvme_remove_namespaces(struct nvme_ctrl *ctrl)
3942
3948
* removing the namespaces' disks; fail all the queues now to avoid
3943
3949
* potentially having to clean up the failed sync later.
3944
3950
*/
3945
- if (ctrl -> state == NVME_CTRL_DEAD ) {
3951
+ if (ctrl -> state == NVME_CTRL_DEAD )
3946
3952
nvme_mark_namespaces_dead (ctrl );
3947
- nvme_unquiesce_io_queues (ctrl );
3948
- }
3949
3953
3950
3954
/* this is a no-op when called from the controller reset handler */
3951
3955
nvme_change_ctrl_state (ctrl , NVME_CTRL_DELETING_NOIO );
You can’t perform that action at this time.
0 commit comments