Commit 19fec6bb authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

nvme: add remove callback to spdk_nvme_probe()



This will allow removal notifications to be propagated to the library
user (e.g. for hotplug).

The callback is currently unused, but this at least prepares the API for
the future hotplug support.

Based on a patch by Dave Jiang <dave.jiang@intel.com>

Change-Id: I20b1c2dbf5e084e0b45a7e51205aba4514ee9a95
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent e2d3cc65
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -922,7 +922,7 @@ register_controllers(void)
{
	printf("Initializing NVMe Controllers\n");

	if (spdk_nvme_probe(NULL, probe_cb, attach_cb) != 0) {
	if (spdk_nvme_probe(NULL, probe_cb, attach_cb, NULL) != 0) {
		fprintf(stderr, "spdk_nvme_probe() failed\n");
		return 1;
	}
+1 −1
Original line number Diff line number Diff line
@@ -218,7 +218,7 @@ static int spdk_fio_setup(struct thread_data *td)
	}

	/* Enumerate all of the controllers */
	if (spdk_nvme_probe(td, probe_cb, attach_cb) != 0) {
	if (spdk_nvme_probe(td, probe_cb, attach_cb, NULL) != 0) {
		fprintf(stderr, "spdk_nvme_probe() failed\n");
		return 1;
	}
+1 −1
Original line number Diff line number Diff line
@@ -379,7 +379,7 @@ int main(int argc, char **argv)
	 *  called for each controller after the SPDK NVMe driver has completed
	 *  initializing the controller we chose to attach.
	 */
	rc = spdk_nvme_probe(NULL, probe_cb, attach_cb);
	rc = spdk_nvme_probe(NULL, probe_cb, attach_cb, NULL);
	if (rc != 0) {
		fprintf(stderr, "spdk_nvme_probe() failed\n");
		cleanup();
+1 −1
Original line number Diff line number Diff line
@@ -944,7 +944,7 @@ int main(int argc, char **argv)
	}

	rc = 0;
	if (spdk_nvme_probe(NULL, probe_cb, attach_cb) != 0) {
	if (spdk_nvme_probe(NULL, probe_cb, attach_cb, NULL) != 0) {
		fprintf(stderr, "spdk_nvme_probe() failed\n");
		rc = 1;
	}
+1 −1
Original line number Diff line number Diff line
@@ -859,7 +859,7 @@ int main(int argc, char **argv)
		exit(1);
	}

	if (spdk_nvme_probe(NULL, probe_cb, attach_cb) != 0) {
	if (spdk_nvme_probe(NULL, probe_cb, attach_cb, NULL) != 0) {
		fprintf(stderr, "spdk_nvme_probe() failed\n");
		return 1;
	}
Loading