From 18529e917dc6d5d3b27f1d0716e6b7b05137549a Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Thu, 22 Sep 2016 13:12:25 +0800 Subject: [PATCH] nvme: print the End-to-End data protection information in identify application Change-Id: I97171328f5c7dea593aa1e9b40a96d7a42f37e2c Signed-off-by: Changpeng Liu --- examples/nvme/identify/identify.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/nvme/identify/identify.c b/examples/nvme/identify/identify.c index 3672c9d50..50d1cc2da 100644 --- a/examples/nvme/identify/identify.c +++ b/examples/nvme/identify/identify.c @@ -354,6 +354,14 @@ print_namespace(struct spdk_nvme_ns *ns) (flags & SPDK_NVME_NS_FLUSH_SUPPORTED) ? "Supported" : "Not Supported"); printf("Reservation: %s\n", (flags & SPDK_NVME_NS_RESERVATION_SUPPORTED) ? "Supported" : "Not Supported"); + if (flags & SPDK_NVME_NS_DPS_PI_SUPPORTED) { + printf("End-to-End Data Protection: Supported\n"); + printf("Protection Type: Type%d\n", nsdata->dps.pit); + printf("Metadata Transfered as: %s\n", + nsdata->flbas.extended ? "Extended Data LBA" : "Separate Metadata Buffer"); + printf("Metadata Location: %s\n", + nsdata->dps.md_start ? "First 8 Bytes" : "Last 8 Bytes"); + } printf("Size (in LBAs): %lld (%lldM)\n", (long long)nsdata->nsze, (long long)nsdata->nsze / 1024 / 1024);