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: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ib866fc88bfdf981d1e89ef5a863f50ff41f4e159
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12050
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Shuhei Matsumoto 2022-03-27 20:18:29 +09:00 committed by Tomasz Zawadzki
parent edb03a183f
commit c0415feda3

View File

@ -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) {