Spdk/test/unit/lib
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
..
bdev lvol: add lvs name in rpc calls 2017-10-27 13:10:21 -04:00
blob blob: fix bug when specifing cluster size < 4096 2017-10-26 14:21:22 -04:00
blobfs blobfs, tree: fix a bug in spdk_tree_insert_buffer 2017-08-15 16:36:41 -04:00
event ut/event: add fatal assert for allocation 2017-10-17 11:34:38 -04:00
ioat test: move IOAT library unit test to test/unit 2017-06-21 18:57:35 -04:00
iscsi iscsi and ut/iscsi: deny initiator grp w/ empty netmask 2017-11-03 14:08:47 -04:00
json test/json_util_ut: assert that string is valid 2017-07-12 18:13:23 -04:00
jsonrpc jsonrpc: allow asynchronous request completion 2017-07-12 12:10:31 -04:00
log log: add new parm to spdk_trace_dump() 2017-09-06 17:33:03 -04:00
lvol unit/lvol: fix uuid setting in unit tests 2017-11-02 14:13:03 -04:00
nvme nvme: use spdk_pci_device_claim() in nvme_pcie_ctrlr_construct 2017-11-03 18:48:33 -04:00
nvmf nvmf: don't allow 0xFFFFFFFF as a NSID 2017-09-19 17:16:59 -04:00
scsi scsi: add UT code for spdk_scsi_dev_add/delete_port 2017-10-12 15:46:14 -04:00
util util: fail io_device unregister if foreach operations outstanding 2017-09-20 19:27:06 -04:00
vhost vhost: interrupts coalescing 2017-10-27 13:06:40 -04:00
Makefile lvol: Logical volume implementation 2017-09-14 19:30:54 -04:00