]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
DDF: use array_size from metadata.
authorNeilBrown <neilb@suse.de>
Thu, 10 Apr 2014 02:54:13 +0000 (12:54 +1000)
committerNeilBrown <neilb@suse.de>
Wed, 21 May 2014 01:54:48 +0000 (11:54 +1000)
If some other controller sets a number smaller than a calculation
would give us, we really should honour it.

Signed-off-by: NeilBrown <neilb@suse.de>
super-ddf.c

index bd99f3a6c6e51c82277f32ab9b3c73efc4c90f85..a5245d3b2c58c94879b2eeb0591cb0c247a6cb98 100644 (file)
@@ -2062,7 +2062,7 @@ static void getinfo_super_ddf_bvd(struct supertype *st, struct mdinfo *info, cha
        info->array.ctime         = DECADE + __be32_to_cpu(*cptr);
        info->array.utime         = DECADE + be32_to_cpu(vc->conf.timestamp);
        info->array.chunk_size    = 512 << vc->conf.chunk_shift;
-       info->custom_array_size   = 0;
+       info->custom_array_size   = be64_to_cpu(vc->conf.array_blocks);
 
        conf = &vc->conf;
        n_prim = be16_to_cpu(conf->prim_elmnt_count);