https://github.com/torvalds/linux
Revision 646017a612e72f19bd9f991fe25287a149c5f627 authored by Keith Busch on 24 February 2016, 16:15:54 UTC, committed by Jens Axboe on 03 March 2016, 21:42:49 UTC
This patch makes nvme namespace removal lockless. It is up to the caller
to ensure no active namespace scanning is occuring. To ensure no scan
work occurs, the nvme pci driver adds a removing state to the controller
device to avoid queueing scan work during removal. The work is flushed
after setting the state, so no new scan work can be queued.

The lockless removal allows the driver to cleanup a namespace
request_queue if the controller fails during removal. Previously this
could deadlock trying to acquire the namespace mutex in order to handle
such events.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
1 parent 075790e
History
Tip revision: 646017a612e72f19bd9f991fe25287a149c5f627 authored by Keith Busch on 24 February 2016, 16:15:54 UTC
NVMe: Fix namespace removal deadlock
Tip revision: 646017a
File Mode Size
Kconfig -rw-r--r-- 1.5 KB
Makefile -rw-r--r-- 374 bytes
caif_dev.c -rw-r--r-- 12.8 KB
caif_socket.c -rw-r--r-- 26.4 KB
caif_usb.c -rw-r--r-- 5.3 KB
cfcnfg.c -rw-r--r-- 14.3 KB
cfctrl.c -rw-r--r-- 15.8 KB
cfdbgl.c -rw-r--r-- 1.5 KB
cfdgml.c -rw-r--r-- 2.9 KB
cffrml.c -rw-r--r-- 4.5 KB
cfmuxl.c -rw-r--r-- 6.3 KB
cfpkt_skbuff.c -rw-r--r-- 8.4 KB
cfrfml.c -rw-r--r-- 6.4 KB
cfserl.c -rw-r--r-- 4.3 KB
cfsrvl.c -rw-r--r-- 5.5 KB
cfutill.c -rw-r--r-- 2.8 KB
cfveil.c -rw-r--r-- 2.5 KB
cfvidl.c -rw-r--r-- 1.7 KB
chnl_net.c -rw-r--r-- 13.1 KB

back to top