linux-stable/drivers/nvme/host
Keith Busch e7ad43c3ed nvme: lock NS list changes while handling command effects
If a controller supports the NS Change Notification, the namespace
scan_work is automatically triggered after attaching a new namespace.

Occasionally the namespace scan_work may append the new namespace to the
list before the admin command effects handling is completed. The effects
handling unfreezes namespaces, but if it unfreezes the newly attached
namespace, its request_queue freeze depth will be off and we'll hit the
warning in blk_mq_unfreeze_queue().

On the next namespace add, we will fail to freeze that queue due to the
previous bad accounting and deadlock waiting for frozen.

Fix that by preventing scan work from altering the namespace list while
command effects handling needs to pair freeze with unfreeze.

Reported-by: Wen Xiong <wenxiong@us.ibm.com>
Tested-by: Wen Xiong <wenxiong@us.ibm.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2019-02-06 16:35:33 +01:00
..
core.c nvme: lock NS list changes while handling command effects 2019-02-06 16:35:33 +01:00
fabrics.c nvme-fabrics: unset write/poll queues for discovery controllers 2019-01-09 13:47:06 -05:00
fabrics.h nvme-fabrics: allow user to pass in nr_poll_queues 2018-12-18 17:50:49 +01:00
fault_inject.c nvme: Add fault injection feature 2018-03-26 08:53:43 -06:00
fc.c nvme-fabrics: allow nvmf_connect_io_queue to poll 2018-12-18 17:50:48 +01:00
Kconfig nvme-tcp: add NVMe over TCP host driver 2018-12-13 09:58:58 +01:00
lightnvm.c nvme: remove nvme_common command cdw10 array 2018-12-13 09:59:01 +01:00
Makefile nvme-tcp: add NVMe over TCP host driver 2018-12-13 09:58:58 +01:00
multipath.c nvme-multipath: drop optimization for static ANA group IDs 2019-01-23 17:16:59 -07:00
nvme.h nvme: lock NS list changes while handling command effects 2019-02-06 16:35:33 +01:00
pci.c for-linus-20190118 2019-01-20 09:12:50 +12:00
rdma.c nvme-rdma: rework queue maps handling 2019-01-23 17:16:59 -07:00
tcp.c nvme-tcp: fix timeout handler 2019-01-23 17:16:59 -07:00
trace.c nvme-pci: trace SQ status on completions 2018-12-19 08:35:36 +01:00
trace.h nvme-pci: trace SQ status on completions 2018-12-19 08:35:36 +01:00