From c0415feda34fb951e3f3d1168283575cceb65664 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Sun, 27 Mar 2022 20:18:29 +0900 Subject: [PATCH] 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 Change-Id: Ib866fc88bfdf981d1e89ef5a863f50ff41f4e159 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12050 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Community-CI: Broadcom CI Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki --- module/bdev/nvme/bdev_nvme_rpc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/bdev/nvme/bdev_nvme_rpc.c b/module/bdev/nvme/bdev_nvme_rpc.c index 0f0bd6992..8fda23144 100644 --- a/module/bdev/nvme/bdev_nvme_rpc.c +++ b/module/bdev/nvme/bdev_nvme_rpc.c @@ -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) {