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
754c5fc7eb
.
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>
This commit is contained in:
committed by
Alasdair G Kergon
parent
a732c207d1
commit
5dea271b6d
@@ -324,12 +324,12 @@ static int delay_iterate_devices(struct dm_target *ti,
|
||||
struct delay_c *dc = ti->private;
|
||||
int ret = 0;
|
||||
|
||||
ret = fn(ti, dc->dev_read, dc->start_read, data);
|
||||
ret = fn(ti, dc->dev_read, dc->start_read, ti->len, data);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
if (dc->dev_write)
|
||||
ret = fn(ti, dc->dev_write, dc->start_write, data);
|
||||
ret = fn(ti, dc->dev_write, dc->start_write, ti->len, data);
|
||||
|
||||
out:
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user