Commit ea9df47c authored by Mike Snitzer's avatar Mike Snitzer Committed by Alasdair G Kergon

dm table: fix blk_stack_limits arg to use bytes not sectors

The offset passed to blk_stack_limits() must be in bytes not sectors.
Fixes false warnings like the following:
device-mapper: table: 254:1: target device sda6 is misaligned
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
Reported-by: default avatarFrans Pop <elendil@planet.nl>
Tested-by: default avatarFrans Pop <elendil@planet.nl>
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
parent 874d2f61
......@@ -495,7 +495,7 @@ int dm_set_device_limits(struct dm_target *ti, struct dm_dev *dev,
return 0;
}
if (blk_stack_limits(limits, &q->limits, start) < 0)
if (blk_stack_limits(limits, &q->limits, start << 9) < 0)
DMWARN("%s: target device %s is misaligned",
dm_device_name(ti->table->md), bdevname(bdev, b));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment