[PATCH 1/4] DDF: find_vdcr: fix minor bug in debug message

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

 



This code could find disk -1. Fixed.
---
 super-ddf.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/super-ddf.c b/super-ddf.c
index ae6cdf4..ac30e4e 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -1731,7 +1731,7 @@ static struct vd_config *find_vdcr(struct ddf_super *ddf, unsigned int inst,
 	struct vcl *v;
 
 	for (v = ddf->conflist; v; v = v->next) {
-		unsigned int nsec, ibvd;
+		unsigned int nsec, ibvd = 0;
 		struct vd_config *conf;
 		if (inst != v->vcnum)
 			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))
 			goto bad;
 		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;
 		return conf;
 	}
-- 
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