File tree Expand file tree Collapse file tree 4 files changed +13
-6
lines changed Expand file tree Collapse file tree 4 files changed +13
-6
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 );
Original file line number Diff line number Diff line change @@ -3402,7 +3402,8 @@ static const struct pci_device_id nvme_id_table[] = {
3402
3402
{ PCI_DEVICE (0x1d97 , 0x2263 ), /* SPCC */
3403
3403
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES , },
3404
3404
{ PCI_DEVICE (0x144d , 0xa80b ), /* Samsung PM9B1 256G and 512G */
3405
- .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES , },
3405
+ .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES |
3406
+ NVME_QUIRK_BOGUS_NID , },
3406
3407
{ PCI_DEVICE (0x144d , 0xa809 ), /* Samsung MZALQ256HBJD 256G */
3407
3408
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES , },
3408
3409
{ PCI_DEVICE (0x144d , 0xa802 ), /* Samsung SM953 */
Original file line number Diff line number Diff line change @@ -883,6 +883,7 @@ static int nvme_rdma_configure_io_queues(struct nvme_rdma_ctrl *ctrl, bool new)
883
883
goto out_cleanup_tagset ;
884
884
885
885
if (!new ) {
886
+ nvme_start_freeze (& ctrl -> ctrl );
886
887
nvme_unquiesce_io_queues (& ctrl -> ctrl );
887
888
if (!nvme_wait_freeze_timeout (& ctrl -> ctrl , NVME_IO_TIMEOUT )) {
888
889
/*
@@ -891,6 +892,7 @@ static int nvme_rdma_configure_io_queues(struct nvme_rdma_ctrl *ctrl, bool new)
891
892
* to be safe.
892
893
*/
893
894
ret = - ENODEV ;
895
+ nvme_unfreeze (& ctrl -> ctrl );
894
896
goto out_wait_freeze_timed_out ;
895
897
}
896
898
blk_mq_update_nr_hw_queues (ctrl -> ctrl .tagset ,
@@ -940,7 +942,6 @@ static void nvme_rdma_teardown_io_queues(struct nvme_rdma_ctrl *ctrl,
940
942
bool remove )
941
943
{
942
944
if (ctrl -> ctrl .queue_count > 1 ) {
943
- nvme_start_freeze (& ctrl -> ctrl );
944
945
nvme_quiesce_io_queues (& ctrl -> ctrl );
945
946
nvme_sync_io_queues (& ctrl -> ctrl );
946
947
nvme_rdma_stop_io_queues (ctrl );
Original file line number Diff line number Diff line change @@ -1868,6 +1868,7 @@ static int nvme_tcp_configure_io_queues(struct nvme_ctrl *ctrl, bool new)
1868
1868
goto out_cleanup_connect_q ;
1869
1869
1870
1870
if (!new ) {
1871
+ nvme_start_freeze (ctrl );
1871
1872
nvme_unquiesce_io_queues (ctrl );
1872
1873
if (!nvme_wait_freeze_timeout (ctrl , NVME_IO_TIMEOUT )) {
1873
1874
/*
@@ -1876,6 +1877,7 @@ static int nvme_tcp_configure_io_queues(struct nvme_ctrl *ctrl, bool new)
1876
1877
* to be safe.
1877
1878
*/
1878
1879
ret = - ENODEV ;
1880
+ nvme_unfreeze (ctrl );
1879
1881
goto out_wait_freeze_timed_out ;
1880
1882
}
1881
1883
blk_mq_update_nr_hw_queues (ctrl -> tagset ,
@@ -1980,7 +1982,6 @@ static void nvme_tcp_teardown_io_queues(struct nvme_ctrl *ctrl,
1980
1982
if (ctrl -> queue_count <= 1 )
1981
1983
return ;
1982
1984
nvme_quiesce_admin_queue (ctrl );
1983
- nvme_start_freeze (ctrl );
1984
1985
nvme_quiesce_io_queues (ctrl );
1985
1986
nvme_sync_io_queues (ctrl );
1986
1987
nvme_tcp_stop_io_queues (ctrl );
You can’t perform that action at this time.
0 commit comments