提交 ea9df47c 编写于 作者: M Mike Snitzer 提交者: 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: NMike Snitzer <snitzer@redhat.com>
Reported-by: NFrans Pop <elendil@planet.nl>
Tested-by: NFrans Pop <elendil@planet.nl>
Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册