Commit 1f14fea3 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Tomasz Zawadzki
Browse files

bdev/nvme: Get failover path information by NOTICELOG



We do not know failover is attempted from which path to which path.
Get these information by NOTICELOG.

Failover or reset is serialized by the flag ctrlr->resetting and
ctrlr->failover_in_progress.

Hence it is enough to add such information only to start.

Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I97400c048b39dc1b70e6aeb71643b5ed1ca23e72
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5695


Community-CI: Broadcom CI
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent 974c70e6
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -546,6 +546,11 @@ bdev_nvme_failover(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr, bool remove)

	nvme_bdev_ctrlr->resetting = true;
	if (next_trid) {
		assert(curr_trid->trid.trtype != SPDK_NVME_TRANSPORT_PCIE);

		SPDK_NOTICELOG("Start failover from %s:%s to %s:%s\n", curr_trid->trid.traddr,
			       curr_trid->trid.trsvcid,	next_trid->trid.traddr, next_trid->trid.trsvcid);

		nvme_bdev_ctrlr->failover_in_progress = true;
		spdk_nvme_ctrlr_fail(nvme_bdev_ctrlr->ctrlr);
		nvme_bdev_ctrlr->connected_trid = &next_trid->trid;