Spdk/test
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
..
app app: spdk_app_fini no longer gives return code 2017-10-10 10:56:34 -04:00
blobfs/rocksdb test/blobfs: add timing for rocksdb benchmarks 2017-09-20 19:33:50 -04:00
cpp_headers test/cpp_headers: autogenerate header test files 2016-10-03 10:24:18 -07:00
iscsi_tgt iscsi: remove global data members for non-configurable parameters 2017-11-03 12:18:02 -04:00
lib env: return fd from spdk_pci_device_claim() 2017-11-03 18:48:33 -04:00
lvol test/lvol: update test plan with tasting test 2017-10-27 15:42:47 -04:00
nvmf lvol: add lvs name in rpc calls 2017-10-27 13:10:21 -04:00
pmem test/pmem: RPC pmem functional tests. 2017-10-19 15:16:05 -04:00
unit nvme: use spdk_pci_device_claim() in nvme_pcie_ctrlr_construct 2017-11-03 18:48:33 -04:00
vhost lvol: add lvs name in rpc calls 2017-10-27 13:10:21 -04:00
Makefile test: begin moving unit tests into test/unit 2017-06-16 16:43:48 -04:00
spdk_cunit.h include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00