From 6f155b15be4a46b73bf35518f5af257f5423e964 Mon Sep 17 00:00:00 2001 From: Tomasz Zawadzki Date: Wed, 24 Apr 2019 06:33:47 -0400 Subject: [PATCH] lib/nvme: fix big endian conversion for logical_block_size logical_block_size and geometry_logical_block_size are uint32_t, so correct conversion for endianness is used now. Change-Id: Iaa5ff576da8bc4ca65fa21f28eb3afd30507b00a Signed-off-by: Tomasz Zawadzki Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451867 Tested-by: SPDK CI Jenkins Reviewed-by: Darek Stojaczyk Reviewed-by: Ben Walker Reviewed-by: Paul Luse --- lib/nvme/nvme_opal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nvme/nvme_opal.c b/lib/nvme/nvme_opal.c index 959f98a7e0..12eaa913ab 100644 --- a/lib/nvme/nvme_opal.c +++ b/lib/nvme/nvme_opal.c @@ -580,7 +580,7 @@ opal_check_geometry(struct spdk_opal_dev *dev, const void *data) opal_info->geometry = 1; opal_info->geometry_align = geo->align; - opal_info->geometry_logical_block_size = from_be64(&geo->logical_block_size); + opal_info->geometry_logical_block_size = from_be32(&geo->logical_block_size); opal_info->geometry_lowest_aligned_lba = lowest_lba; opal_info->geometry_alignment_granularity = align; }