Spdk/lib/bdev
Jim Harris 32bff28a25 nvme: use spdk_pci_device_claim() in nvme_pcie_ctrlr_construct
spdk_pci_device_claim() can be used to ensure only one process
at a time uses any given PCI device.  Previously this was only
used in the bdev_nvme driver - other apps like nvme/perf do
not use spdk_pci_device_claim() and could effectively rip out
the device from a running bdev-based app like the NVMe-oF target.

So instead of modifying all of the nvme apps, put this logic into
the core nvme driver instead so that all applications get the
benefit transparently.  Save the fd when the controller is constructed
and then close it when the controller is destructed to handle the
detach (including hotplug) cases.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5dc48a2e41dc06707800f15a9e1f9141477628c6

Reviewed-on: https://review.gerrithub.io/385524
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-03 18:48:33 -04:00
..
aio bdev: remove spdk_bdev_poller_start() lcore option 2017-10-18 20:28:29 -04:00
error bdev: add callback to free part_base 2017-10-01 21:57:00 -04:00
gpt bdev/gpt: check against get_io_channel failure 2017-10-19 00:33:06 -04:00
lvol lvol: add lvs name in rpc calls 2017-10-27 13:10:21 -04:00
malloc bdev/malloc: allow user to specify bdev name 2017-10-11 23:55:45 -04:00
null bdev/null: add Write Zeroes support 2017-09-25 16:31:49 -04:00
nvme nvme: use spdk_pci_device_claim() in nvme_pcie_ctrlr_construct 2017-11-03 18:48:33 -04:00
pmem pmem: bdev names for pmem bdevs 2017-10-27 13:10:07 -04:00
rbd bdev: remove spdk_bdev_poller_start() lcore option 2017-10-18 20:28:29 -04:00
rpc bdev: add callback to spdk bdev unregister and bdev destruct 2017-10-26 17:23:58 -04:00
split bdev: add callback to free part_base 2017-10-01 21:57:00 -04:00
virtio bdev/virtio: check if unmap is supported via VPD page 2017-10-30 12:17:50 -04:00
bdev.c event/subsystem/bdev: asynchronous SPDK finish 2017-10-27 13:03:55 -04:00
Makefile bdev_virtio: added --without-virtio configure flag 2017-10-19 19:06:12 -04:00
scsi_nvme.c nvme_spec: remove SGL Sub Type Invalid status code 2017-09-22 17:11:53 -04:00
vtune.c bdev: #include VTune file to control warnings 2017-06-08 12:44:25 -04:00