DDF: getinfo_super_ddf_bvd: fix offset calculation for SVDs

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>
This commit is contained in:
mwilck@arcor.de 2013-07-19 21:04:12 +02:00 committed by NeilBrown
parent 6a350d82b9
commit fbf0c2a7ac
1 changed files with 2 additions and 2 deletions

View 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)