DDF: find_vdcr: fix minor bug in debug message
This code could find disk -1. Fixed. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
4b1679dd39
commit
84e32e1977
|
@ -1731,7 +1731,7 @@ static struct vd_config *find_vdcr(struct ddf_super *ddf, unsigned int inst,
|
||||||
struct vcl *v;
|
struct vcl *v;
|
||||||
|
|
||||||
for (v = ddf->conflist; v; v = v->next) {
|
for (v = ddf->conflist; v; v = v->next) {
|
||||||
unsigned int nsec, ibvd;
|
unsigned int nsec, ibvd = 0;
|
||||||
struct vd_config *conf;
|
struct vd_config *conf;
|
||||||
if (inst != v->vcnum)
|
if (inst != v->vcnum)
|
||||||
continue;
|
continue;
|
||||||
|
@ -1763,7 +1763,7 @@ static struct vd_config *find_vdcr(struct ddf_super *ddf, unsigned int inst,
|
||||||
n - nsec*conf->sec_elmnt_count, n_bvd))
|
n - nsec*conf->sec_elmnt_count, n_bvd))
|
||||||
goto bad;
|
goto bad;
|
||||||
dprintf("%s: found disk %u as member %u in bvd %d of array %u\n"
|
dprintf("%s: found disk %u as member %u in bvd %d of array %u\n"
|
||||||
, __func__, n, *n_bvd, ibvd-1, inst);
|
, __func__, n, *n_bvd, ibvd, inst);
|
||||||
*vcl = v;
|
*vcl = v;
|
||||||
return conf;
|
return conf;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue