The branch stable/13 has been updated by mav:

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

commit 0b1b2d68829eea3ad47af984ddf06a839b39ff42
Author:     Alexander Motin <[email protected]>
AuthorDate: 2021-07-14 18:01:22 +0000
Commit:     Alexander Motin <[email protected]>
CommitDate: 2021-07-21 01:54:38 +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
    
    (cherry picked from commit d379886a4170fa3d95a5354612a5e2c15b104841)
---
 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) &
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to