From ce7b461b7f9203ecb0c8476c7c6670722d634120 Mon Sep 17 00:00:00 2001 From: Tim Zhang Date: Sun, 1 Jan 2023 17:53:14 +0800 Subject: [PATCH] bdev_nvme: add hdgst and ddgst in nvme_ctrlr_config_json this add output when execute save_config function Signed-off-by: Tim Zhang Change-Id: Ib465dc424beb691e86425878588bb732574fc9b4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16097 Reviewed-by: Ben Walker Reviewed-by: Jim Harris Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins --- module/bdev/nvme/bdev_nvme.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/bdev/nvme/bdev_nvme.c b/module/bdev/nvme/bdev_nvme.c index ced982861..83546a3a0 100644 --- a/module/bdev/nvme/bdev_nvme.c +++ b/module/bdev/nvme/bdev_nvme.c @@ -7130,6 +7130,7 @@ nvme_ctrlr_config_json(struct spdk_json_write_ctx *w, struct nvme_ctrlr *nvme_ctrlr) { struct spdk_nvme_transport_id *trid; + const struct spdk_nvme_ctrlr_opts *opts; if (nvme_ctrlr->opts.from_discovery_service) { /* Do not emit an RPC for this - it will be implicitly @@ -7157,6 +7158,10 @@ nvme_ctrlr_config_json(struct spdk_json_write_ctx *w, spdk_json_write_named_uint32(w, "fast_io_fail_timeout_sec", nvme_ctrlr->opts.fast_io_fail_timeout_sec); + opts = spdk_nvme_ctrlr_get_opts(nvme_ctrlr->ctrlr); + spdk_json_write_named_bool(w, "hdgst", opts->header_digest); + spdk_json_write_named_bool(w, "ddgst", opts->data_digest); + spdk_json_write_object_end(w); spdk_json_write_object_end(w);