]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Detail: print correct size for large external-metadata arrays.
authorNeilBrown <neilb@suse.de>
Tue, 5 Feb 2013 04:32:49 +0000 (15:32 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 5 Feb 2013 05:00:50 +0000 (16:00 +1100)
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>
Detail.c

index ff0b6e868564ac9a5e154872ddd89ba1c7686f85..ab49803dbaa2c2abbfa5f3692da965f7f55b4616 100644 (file)
--- 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);