numam-spdk/lib/bdev/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
..
bdev_nvme_rpc.c RPC: Add rpc support to update firmware. 2017-10-31 12:49:31 -04:00
bdev_nvme.c nvme: use spdk_pci_device_claim() in nvme_pcie_ctrlr_construct 2017-11-03 18:48:33 -04:00
bdev_nvme.h RPC: Add rpc support to update firmware. 2017-10-31 12:49:31 -04:00
Makefile bdev: rename blockdev instances to bdev 2017-07-14 13:31:30 -04:00