[PATCH 3/6] DDF: getinfo_super_ddf_bvd: fix offset calculation for SVDs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix a bug that caused the wrong conf record to be used to derive
data offset and size on secondary RAID (RAID10).
---
 super-ddf.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/super-ddf.c b/super-ddf.c
index dc3f69b..d7da4c1 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)
-- 
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux