From: NeilBrown Date: Tue, 5 Feb 2013 04:32:49 +0000 (+1100) Subject: Detail: print correct size for large external-metadata arrays. X-Git-Tag: mdadm-3.3-rc1~126 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec1b28fdc0b00b14a6550621951e58f159cb105e;p=thirdparty%2Fmdadm.git Detail: print correct size for large external-metadata arrays. If externally menaged metadata is in use, array.major_version will be zero, so the test here to consider using get_component_size() is wrong. So if sra is present, use the major_version from there. Signed-off-by: NeilBrown --- diff --git a/Detail.c b/Detail.c index ff0b6e86..ab49803d 100644 --- a/Detail.c +++ b/Detail.c @@ -338,6 +338,8 @@ int Detail(char *dev, struct context *c) printf(" Array Size : %llu%s\n", (larray_size>>10), human_size(larray_size)); if (array.level >= 1) { + if (sra) + array.major_version = sra->array.major_version; if (array.major_version != 0 && (larray_size >= 0xFFFFFFFFULL|| array.size == 0)) { unsigned long long dsize = get_component_size(fd);