From f671ff49c2efc466985636cb4eee95ed0cac2cd1 Mon Sep 17 00:00:00 2001 From: Ben Chuang Date: Mon, 1 Apr 2024 14:22:07 +0800 Subject: [PATCH] util: Fixed nvme_id_ns_flbas_to_lbaf_inuse() Signed-off-by: Ben Chuang --- src/nvme/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvme/util.h b/src/nvme/util.h index 517c696c..cfbfdb92 100644 --- a/src/nvme/util.h +++ b/src/nvme/util.h @@ -483,7 +483,7 @@ static inline void nvme_feature_decode_namespace_write_protect(__u32 value, static inline void nvme_id_ns_flbas_to_lbaf_inuse(__u8 flbas, __u8 *lbaf_inuse) { - *lbaf_inuse = ((NVME_FLBAS_HIGHER(flbas) >> 1) | + *lbaf_inuse = ((NVME_FLBAS_HIGHER(flbas) << 4) | NVME_FLBAS_LOWER(flbas)); }