linux/drivers/nvme/host
Keith Busch 32f0c4afb4 nvme: Remove RCU namespace protection
We can't sleep with RCU read lock held, but we need to do potentially
blocking stuff to namespace queues when iterating the list. This patch
removes the RCU locking and holds a mutex instead.

To prevent deadlocks, this patch removes holding the mutex during
namespace scanning and removal. The unlocked namespace scanning is made
safe by holding a reference to the namespace being scanned.

List iteration that does IO has to be unlocked to allow error recovery.
The caller must ensure the list can not be manipulated during such an
event, so this patch adds a comment explaining this requirement to the
only function that iterates an unlocked list. All callers currently
meet this requirement, so no further changes required.

List iterations that do not do IO can safely use the lock since it couldn't
block recovery from missing forced IO completions.

Reported-by: Ming Lin <mlin at kernel.org>
[fixes 0bf77e9 nvme: switch to RCU freeing the namespace]
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
2016-07-14 08:48:08 -07:00
..
Kconfig NVMe: small typo in section BLK_DEV_NVME_SCSI of host/Kconfig 2016-04-26 08:31:50 -06:00
Makefile nvme: split pci module out of core module 2016-02-10 14:22:38 -07:00
core.c nvme: Remove RCU namespace protection 2016-07-14 08:48:08 -07:00
lightnvm.c lightnvm: rename nr_pages to nr_ppas on nvm_rq 2016-05-06 12:51:10 -06:00
nvme.h NVMe: Short-cut removal on surprise hot-unplug 2016-05-17 17:14:21 -06:00
pci.c NVMe: Only release requested regions 2016-06-09 14:28:28 -06:00
scsi.c nvme: move chardev and sysfs interface to common code 2015-12-01 10:59:40 -07:00