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 <neilb@suse.de>
This commit is contained in:
NeilBrown 2013-02-05 15:32:49 +11:00
parent 030419821f
commit ec1b28fdc0
1 changed files with 2 additions and 0 deletions

View File

@ -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);