Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jul 2021 18:05:25 GMT
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: d379886a4170 - main - Filter out LBA formats with LBA Data Size of 0.
Message-ID:  <202107141805.16EI5Pvh060808@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mav:

URL: https://cgit.FreeBSD.org/src/commit/?id=d379886a4170fa3d95a5354612a5e2c15b104841

commit d379886a4170fa3d95a5354612a5e2c15b104841
Author:     Alexander Motin <mav@FreeBSD.org>
AuthorDate: 2021-07-14 18:01:22 +0000
Commit:     Alexander Motin <mav@FreeBSD.org>
CommitDate: 2021-07-14 18:05:20 +0000

    Filter out LBA formats with LBA Data Size of 0.
    
    According to the spec: "If the value reported is 0h, then LBA format
    is not supported / used or is not currently available".
    
    MFC after:      1 week
---
 sbin/nvmecontrol/identify.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sbin/nvmecontrol/identify.c b/sbin/nvmecontrol/identify.c
index 86b7369883fb..6cd7ad0fdc2d 100644
--- a/sbin/nvmecontrol/identify.c
+++ b/sbin/nvmecontrol/identify.c
@@ -175,6 +175,8 @@ print_namespace(struct nvme_namespace_data *nsdata)
 		lbaf = nsdata->lbaf[i];
 		lbads = (lbaf >> NVME_NS_DATA_LBAF_LBADS_SHIFT) &
 			NVME_NS_DATA_LBAF_LBADS_MASK;
+		if (lbads == 0)
+			continue;
 		ms = (lbaf >> NVME_NS_DATA_LBAF_MS_SHIFT) &
 			NVME_NS_DATA_LBAF_MS_MASK;
 		rp = (lbaf >> NVME_NS_DATA_LBAF_RP_SHIFT) &



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107141805.16EI5Pvh060808>