]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvme-print: Add VWCNP on NSFEAT of id-ns
authorSteven Seungcheol Lee <sc108.lee@samsung.com>
Wed, 8 Feb 2023 06:05:27 +0000 (15:05 +0900)
committerDaniel Wagner <wagi@monom.org>
Thu, 13 Apr 2023 11:14:22 +0000 (13:14 +0200)
Identify – I/O Command Set Independent Identify Namespace Data Structure
From TP4146 Flexible Data Placement 2022.11.30 Ratified

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
nvme-print.c

index 11746993a4b4d1427ed7f028ffa2bb36e9873665..805c8c597e82bf2cf4e8d6815933d64e48131e10 100644 (file)
@@ -2753,12 +2753,15 @@ void nvme_show_id_ns(struct nvme_id_ns *ns, unsigned int nsid,
 
 static void nvme_show_cmd_set_independent_id_ns_nsfeat(__u8 nsfeat)
 {
-       __u8 rsvd5 = (nsfeat & 0xE0) >> 5;
+       __u8 rsvd6 = (nsfeat & 0xE0) >> 6;
+       __u8 vwcnp = (nsfeat & 0x20) >> 5;
        __u8 rmedia = (nsfeat & 0x10) >> 4;
        __u8 uidreuse = (nsfeat & 0x8) >> 3;
        __u8 rsvd0 = (nsfeat & 0x7);
-       if (rsvd5)
-               printf("  [7:5] : %#x\tReserved\n", rsvd5);
+       if (rsvd6)
+               printf("  [7:6] : %#x\tReserved\n", rsvd6);
+       printf("  [5:5] : %#x\tVolatile Write Cache is %sPresent\n",
+               vwcnp, vwcnp ? "" : "Not ");
        printf("  [4:4] : %#x\tNamespace %sstore data on rotational media\n",
                rmedia, rmedia ? "" : "does not ");
        printf("  [3:3] : %#x\tNGUID and EUI64 fields if non-zero, %sReused\n",