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

bdev/nvme: Copy prchk_flags from first to new ctrlr for multipath



When configuring multipath, if the first controller did not have
namespace#0 but the second controller had namespace#0, prchk_flags
was not set as expected because we could set prchk only for the first
controller.

This patch fixes the bug by copying prchk_flags from the first
controller to the following controllers.

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


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent edb03a18
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -500,6 +500,8 @@ rpc_bdev_nvme_attach_controller(struct spdk_jsonrpc_request *request,
							     ctx->req.name);
			goto cleanup;
		}

		ctx->req.bdev_opts.prchk_flags = ctrlr->opts.prchk_flags;
	}

	if (ctx->req.multipath != NULL && strcasecmp(ctx->req.multipath, "multipath") == 0) {