Commit 02f14756 authored by Konrad Sztyber's avatar Konrad Sztyber Committed by Ben Walker
Browse files

identify: print metadata type regardless of PI type



Print the type of metadata (extended LBA / separate buffer), even if
protection information is disabled. Changed the way protection
information's location is reported to be more accurate (previous
"Metadata Location" wasn't precise enough). Aligned all of the namespace
information fields, so that all values start from the same column.

Change-Id: Ia736db233cbcfdddcfd4a1437907e528f2b8947b
Signed-off-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459623


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarWojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent d354d0a3
Loading
Loading
Loading
Loading
+33 −31
Original line number Diff line number Diff line
@@ -701,11 +701,13 @@ print_namespace(struct spdk_nvme_ns *ns)
	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",
		printf("Protection Information Transferred as: %s\n",
		       nsdata->dps.md_start ? "First 8 Bytes" : "Last 8 Bytes");
	}
	if (nsdata->lbaf[nsdata->flbas.format].ms > 0) {
		printf("Metadata Transferred as:               %s\n",
		       nsdata->flbas.extended ? "Extended Data LBA" : "Separate Metadata Buffer");
	}
	printf("Namespace Sharing Capabilities:        %s\n",
	       nsdata->nmic.can_share ? "Multiple Controllers" : "Private");
	printf("Size (in LBAs):                        %lld (%lldM)\n",