From: mwilck@arcor.de Date: Fri, 19 Jul 2013 19:04:12 +0000 (+0200) Subject: DDF: getinfo_super_ddf_bvd: fix offset calculation for SVDs X-Git-Tag: mdadm-3.3-rc2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbf0c2a7ac08767651bca1a2d6d7064a0438b0d8;p=thirdparty%2Fmdadm.git 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 --- diff --git a/super-ddf.c b/super-ddf.c index dc3f69ba..d7da4c19 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -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)