]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
DDF: getinfo_super_ddf_bvd: fix offset calculation for SVDs
authormwilck@arcor.de <mwilck@arcor.de>
Fri, 19 Jul 2013 19:04:12 +0000 (21:04 +0200)
committerNeilBrown <neilb@suse.de>
Mon, 22 Jul 2013 06:56:32 +0000 (16:56 +1000)
Fix a bug that caused the wrong conf record to be used to derive
data offset and size on secondary RAID (RAID10).

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

index dc3f69baa7cfd5b66ff5a91ae9b0fda76f7c0252..d7da4c192284126940a360a8372cf24780ab98b8 100644 (file)
@@ -1881,11 +1881,11 @@ static void getinfo_super_ddf_bvd(struct supertype *st, struct mdinfo *info, cha
 
        if (cd >= 0 && (unsigned)cd < ddf->mppe) {
                info->data_offset =
-                       __be64_to_cpu(LBA_OFFSET(ddf, &vc->conf)[cd]);
+                       __be64_to_cpu(LBA_OFFSET(ddf, conf)[cd]);
                if (vc->block_sizes)
                        info->component_size = vc->block_sizes[cd];
                else
-                       info->component_size = __be64_to_cpu(vc->conf.blocks);
+                       info->component_size = __be64_to_cpu(conf->blocks);
        }
 
        for (dl = ddf->dlist; dl ; dl = dl->next)