Commit 559a97aa authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Jim Harris
Browse files

bdev/nvme: Change if->else to if->return for failover_trid()



This refactroing will reduce the size of the next patch significantly.

Signed-off-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I2eb7ec62e6c559d9e69334e73de49e8bf97a35dd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17652


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
parent 681a5aa4
Loading
Loading
Loading
Loading
+19 −17
Original line number Diff line number Diff line
@@ -1738,7 +1738,10 @@ bdev_nvme_failover_trid(struct nvme_ctrlr *nvme_ctrlr, bool remove)

	path_id->is_failed = true;

	if (next_path) {
	if (next_path == NULL) {
		return;
	}

	assert(path_id->trid.trtype != SPDK_NVME_TRANSPORT_PCIE);

	SPDK_NOTICELOG("Start failover from %s:%s to %s:%s\n", path_id->trid.traddr,
@@ -1758,7 +1761,6 @@ bdev_nvme_failover_trid(struct nvme_ctrlr *nvme_ctrlr, bool remove)
		free(path_id);
	}
}
}

static bool
bdev_nvme_check_ctrlr_loss_timeout(struct nvme_ctrlr *nvme_ctrlr)