Commit aa7c3b1e authored by Marcin Spiewak's avatar Marcin Spiewak Committed by Konrad Sztyber
Browse files

bdev/nvme: changed default config to multipath



If no '-x' option is specified in bdev_nvme_attach_controller RPC call,
the multipath mode is now assigned as a default.

Change-Id: Ic2f67ed61e23489106f02c5529d5fe3858e10943
Signed-off-by: default avatarMarcin Spiewak <marcin.spiewak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/25029


Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent a5cbb2b1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5769,7 +5769,7 @@ spdk_bdev_nvme_get_default_ctrlr_opts(struct spdk_bdev_nvme_ctrlr_opts *opts)
	opts->ctrlr_loss_timeout_sec = g_opts.ctrlr_loss_timeout_sec;
	opts->reconnect_delay_sec = g_opts.reconnect_delay_sec;
	opts->fast_io_fail_timeout_sec = g_opts.fast_io_fail_timeout_sec;
	opts->multipath = false;
	opts->multipath = true;
}

static void
+1 −3
Original line number Diff line number Diff line
@@ -413,9 +413,7 @@ rpc_bdev_nvme_attach_controller(struct spdk_jsonrpc_request *request,

	spdk_nvme_ctrlr_get_default_ctrlr_opts(&ctx->req.drv_opts, sizeof(ctx->req.drv_opts));
	spdk_bdev_nvme_get_default_ctrlr_opts(&ctx->req.bdev_opts);
	/* For now, initialize the multipath parameter to add a failover path. This maintains backward
	 * compatibility with past behavior. In the future, this behavior will change to "disable". */
	ctx->req.multipath = BDEV_NVME_MP_MODE_FAILOVER;
	ctx->req.multipath = BDEV_NVME_MP_MODE_MULTIPATH;
	ctx->req.max_bdevs = DEFAULT_MAX_BDEVS_PER_RPC;

	if (spdk_json_decode_object(params, rpc_bdev_nvme_attach_controller_decoders,