From: Martin Wilck Date: Tue, 30 Jul 2013 21:18:27 +0000 (+0200) Subject: DDF: ddf_process_update: log offsets for conf changes X-Git-Tag: mdadm-3.3~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0847945b8ebb59e2dd7c6bb55246be355f5b3472;p=thirdparty%2Fmdadm.git DDF: ddf_process_update: log offsets for conf changes I needed this for tracking a bug with wrong offsets after array creation. Signed-off-by: Martin Wilck Signed-off-by: NeilBrown --- diff --git a/super-ddf.c b/super-ddf.c index 20f4cf4c..b639f07f 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -4495,10 +4495,27 @@ static void ddf_process_update(struct supertype *st, * fields */ unsigned int i; + unsigned int k; copy_matching_bvd(ddf, &vcl->conf, update); - for (i = 1; i < vc->sec_elmnt_count; i++) + for (k = 0; k < be16_to_cpu(vc->prim_elmnt_count); k++) + dprintf("BVD %u has %08x at %llu\n", 0, + be32_to_cpu(vcl->conf.phys_refnum[k]), + be64_to_cpu(LBA_OFFSET(ddf, + &vcl->conf)[k])); + for (i = 1; i < vc->sec_elmnt_count; i++) { copy_matching_bvd(ddf, vcl->other_bvds[i-1], update); + for (k = 0; k < be16_to_cpu( + vc->prim_elmnt_count); k++) + dprintf("BVD %u has %08x at %llu\n", i, + be32_to_cpu + (vcl->other_bvds[i-1]-> + phys_refnum[k]), + be64_to_cpu + (LBA_OFFSET + (ddf, + vcl->other_bvds[i-1])[k])); + } } else { /* A new VD_CONF */ unsigned int i;