Spdk/lib/nvme
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
..
Makefile nvme: Monitor uevent for device insert and remove 2016-11-30 14:27:43 -07:00
nvme_ctrlr_cmd.c nvme: add controller option to specify host ID 2017-09-29 11:43:25 -04:00
nvme_ctrlr.c nvme: add new spdk_nvme_connect() API to directly attach the ctrlr 2017-10-09 12:31:12 -04:00
nvme_internal.h nvme: add new spdk_nvme_connect() API to directly attach the ctrlr 2017-10-09 12:31:12 -04:00
nvme_ns_cmd.c nvme: decouple NVMe memory page size from PAGE_SIZE 2017-08-17 12:52:12 -04:00
nvme_ns.c log: rename SPDK_TRACELOG to SPDK_DEBUGLOG 2017-08-29 13:25:58 -04:00
nvme_pcie.c nvme: use spdk_pci_device_claim() in nvme_pcie_ctrlr_construct 2017-11-03 18:48:33 -04:00
nvme_qpair.c nvme_spec: remove SGL Sub Type Invalid status code 2017-09-22 17:11:53 -04:00
nvme_quirks.c nvme: update the nvme devices quirks. 2017-09-01 12:35:57 -04:00
nvme_rdma.c nvme_rdma: set retry_count field in rdma_conn_param 2017-10-11 13:59:10 -04:00
nvme_transport.c nvme: add new spdk_nvme_connect() API to directly attach the ctrlr 2017-10-09 12:31:12 -04:00
nvme_uevent.c lib: replace strerror with strerror_r 2017-08-15 16:47:01 -04:00
nvme_uevent.h nvme: Remove pci_addr from probe_info 2016-12-12 10:46:50 -07:00
nvme.c nvme: add new spdk_nvme_connect() API to directly attach the ctrlr 2017-10-09 12:31:12 -04:00