summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-raid1.c
diff options
context:
space:
mode:
authorMike Snitzer2009-07-23 21:30:42 +0200
committerAlasdair G Kergon2009-07-23 21:30:42 +0200
commit5dea271b6d87bd1d79a59c1d5baac2596a841c37 (patch)
treec85bcee4f90729927285fc282c6df94bf18d023d /drivers/md/dm-raid1.c
parentdm: remove queue next_ordered workaround for barriers (diff)
downloadkernel-qcow2-linux-5dea271b6d87bd1d79a59c1d5baac2596a841c37.tar.gz
kernel-qcow2-linux-5dea271b6d87bd1d79a59c1d5baac2596a841c37.tar.xz
kernel-qcow2-linux-5dea271b6d87bd1d79a59c1d5baac2596a841c37.zip
dm table: pass correct dev area size to device_area_is_valid
Incorrect device area lengths are being passed to device_area_is_valid(). The regression appeared in 2.6.31-rc1 through commit 754c5fc7ebb417b23601a6222a6005cc2e7f2913. With the dm-stripe target, the size of the target (ti->len) was used instead of the stripe_width (ti->len/#stripes). An example of a consequent incorrect error message is: device-mapper: table: 254:0: sdb too small for target Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-raid1.c')
-rw-r--r--drivers/md/dm-raid1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
index 42a3e4341d60..9726577cde49 100644
--- a/drivers/md/dm-raid1.c
+++ b/drivers/md/dm-raid1.c
@@ -1293,7 +1293,7 @@ static int mirror_iterate_devices(struct dm_target *ti,
for (i = 0; !ret && i < ms->nr_mirrors; i++)
ret = fn(ti, ms->mirror[i].dev,
- ms->mirror[i].offset, data);
+ ms->mirror[i].offset, ti->len, data);
return ret;
}