diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-08-11 12:14:08 -0700 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-08-11 12:14:08 -0700 | 
| commit | 360e694282fce69608e2775bf843b2aafd19e4b4 (patch) | |
| tree | f46cbd76ded02b76d424abaf56e219fd13ca17c4 /drivers/nvme/host/core.c | |
| parent | 2e40ed24e1696e47e94e804d09ef88ecb6617201 (diff) | |
| parent | a7a7dabb5dd72d2875bc3ce56f94ea5ceb259d5b (diff) | |
Merge tag 'block-6.5-2023-08-11' of git://git.kernel.dk/linux
Pull block fixes from Jens Axboe:
 - NVMe pull request via Keith:
      - Fixes for request_queue state (Ming)
      - Another uuid quirk (August)
 - RCU poll fix for NVMe (Ming)
 - Fix for an IO stall with polled IO (me)
 - Fix for blk-iocost stats enable/disable accounting (Chengming)
 - Regression fix for large pages for zram (Christoph)
* tag 'block-6.5-2023-08-11' of git://git.kernel.dk/linux:
  nvme: core: don't hold rcu read lock in nvme_ns_chr_uring_cmd_iopoll
  blk-iocost: fix queue stats accounting
  block: don't make REQ_POLLED imply REQ_NOWAIT
  block: get rid of unused plug->nowait flag
  zram: take device and not only bvec offset into account
  nvme-pci: add NVME_QUIRK_BOGUS_NID for Samsung PM9B1 256G and 512G
  nvme-rdma: fix potential unbalanced freeze & unfreeze
  nvme-tcp: fix potential unbalanced freeze & unfreeze
  nvme: fix possible hang when removing a controller during error recovery
Diffstat (limited to 'drivers/nvme/host/core.c')
| -rw-r--r-- | drivers/nvme/host/core.c | 10 | 
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 37b6fa746662..f3a01b79148c 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -3933,6 +3933,12 @@ void nvme_remove_namespaces(struct nvme_ctrl *ctrl)  	 */  	nvme_mpath_clear_ctrl_paths(ctrl); +	/* +	 * Unquiesce io queues so any pending IO won't hang, especially +	 * those submitted from scan work +	 */ +	nvme_unquiesce_io_queues(ctrl); +  	/* prevent racing with ns scanning */  	flush_work(&ctrl->scan_work); @@ -3942,10 +3948,8 @@ void nvme_remove_namespaces(struct nvme_ctrl *ctrl)  	 * removing the namespaces' disks; fail all the queues now to avoid  	 * potentially having to clean up the failed sync later.  	 */ -	if (ctrl->state == NVME_CTRL_DEAD) { +	if (ctrl->state == NVME_CTRL_DEAD)  		nvme_mark_namespaces_dead(ctrl); -		nvme_unquiesce_io_queues(ctrl); -	}  	/* this is a no-op when called from the controller reset handler */  	nvme_change_ctrl_state(ctrl, NVME_CTRL_DELETING_NOIO);  | 
