Thread (4 messages) flat view 4 messages, 2 authors, 2021-07-16
STALE1890d

[PATCH 1/3] imsm: correct offset for 4k disks in --examine output

From: Oleksandr Shchirskyi <hidden>
Date: 2021-06-18 13:53:50
Subsystem: the rest · Maintainer: Linus Torvalds

"Sector Offset" field in Examine output was always printed in 512
byte sectors. Update it to support 4096 sector size.

Signed-off-by: Oleksandr Shchirskyi <redacted>
---
 super-intel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/super-intel.c b/super-intel.c
index 54699129..caeb6db3 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -1663,7 +1663,7 @@ static void print_imsm_dev(struct intel_super *super,
 		   (unsigned long long)sz * 512 / super->sector_size,
 	       human_size(sz * 512));
 	printf("  Sector Offset : %llu\n",
-		pba_of_lba0(map));
+		pba_of_lba0(map) * 512 / super->sector_size);
 	printf("    Num Stripes : %llu\n",
 		num_data_stripes(map));
 	printf("     Chunk Size : %u KiB",
-- 
2.27.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help