From 844e6bfa8cabec0be47ec4c52a6cfd027b30fab7 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Fri, 30 Oct 2020 04:27:14 +0900 Subject: [PATCH] bdev/nvme: Add subnqn of controller to bdev_nvme_dump_info_json() subnqn will be used to manage subsystem, and so add it to the output of bdev_nvme_dump_info_json(). Signed-off-by: Shuhei Matsumoto Change-Id: Id28023754fa19d14aa9297f4e6676d235f024e0f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4974 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Reviewed-by: Changpeng Liu Reviewed-by: Jim Harris Reviewed-by: Aleksey Marchuk Tested-by: SPDK CI Jenkins --- module/bdev/nvme/bdev_nvme.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/bdev/nvme/bdev_nvme.c b/module/bdev/nvme/bdev_nvme.c index 484b89a87..53b6f940a 100644 --- a/module/bdev/nvme/bdev_nvme.c +++ b/module/bdev/nvme/bdev_nvme.c @@ -939,6 +939,10 @@ bdev_nvme_dump_info_json(void *ctx, struct spdk_json_write_ctx *w) spdk_str_trim(buf); spdk_json_write_named_string(w, "firmware_revision", buf); + if (cdata->subnqn[0] != '\0') { + spdk_json_write_named_string(w, "subnqn", cdata->subnqn); + } + spdk_json_write_named_object_begin(w, "oacs"); spdk_json_write_named_uint32(w, "security", cdata->oacs.security);