diff options
author | NeilBrown <neilb@suse.de> | 2013-02-05 05:32:49 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-02-05 06:00:50 +0100 |
commit | ec1b28fdc0b00b14a6550621951e58f159cb105e (patch) | |
tree | d792dbe920d4e274fba02431f26e8080db2d70d6 /Detail.c | |
parent | mdmon: add --foreground option (diff) | |
download | mdadm-ec1b28fdc0b00b14a6550621951e58f159cb105e.tar.xz mdadm-ec1b28fdc0b00b14a6550621951e58f159cb105e.zip |
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>
Diffstat (limited to 'Detail.c')
-rw-r--r-- | Detail.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); |