Date: Wed, 21 Jul 2021 01:55:10 GMT From: Alexander Motin <mav@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: e6afa8ef5610 - stable/12 - Filter out LBA formats with LBA Data Size of 0. Message-ID: <202107210155.16L1tAsT028521@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=e6afa8ef56108f8f88c00cefd68e0363b32b7369 commit e6afa8ef56108f8f88c00cefd68e0363b32b7369 Author: Alexander Motin <mav@FreeBSD.org> AuthorDate: 2021-07-14 18:01:22 +0000 Commit: Alexander Motin <mav@FreeBSD.org> CommitDate: 2021-07-21 01:55:08 +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) &
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107210155.16L1tAsT028521>