linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [MDADM PATCH 1/1] Array size is wrong when run mdadm -E
@ 2017-07-04  6:50 Xiao Ni
  2017-07-04  9:03 ` Guoqing Jiang
  0 siblings, 1 reply; 7+ messages in thread
From: Xiao Ni @ 2017-07-04  6:50 UTC (permalink / raw)
  To: linux-raid; +Cc: ncroxon, jes.sorensen

The size of array shows wrongly. It shifs wrong number.

Signed-off-by: Xiao Ni <xni@redhat.com>
---
 super1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/super1.c b/super1.c
index 86ec850..f3b864d 100644
--- a/super1.c
+++ b/super1.c
@@ -366,7 +366,7 @@ static void examine_super1(struct supertype *st, char *homehost)
 		}
 		if (ddsks) {
 			long long asize = __le64_to_cpu(sb->size);
-			asize = (asize << 9) * ddsks / ddsks_denom;
+			asize = (asize << 10) * ddsks / ddsks_denom;
 			printf("     Array Size : %llu%s\n",
 			       asize >> 10,  human_size(asize));
 		}
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-07-05  3:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-04  6:50 [MDADM PATCH 1/1] Array size is wrong when run mdadm -E Xiao Ni
2017-07-04  9:03 ` Guoqing Jiang
2017-07-04  9:55   ` Xiao Ni
2017-07-05  1:56     ` Guoqing Jiang
2017-07-05  2:40       ` Xiao Ni
2017-07-05  3:21         ` Guoqing Jiang
2017-07-05  3:24           ` Xiao Ni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).