dm table: fix blk_stack_limits arg to use bytes not sectors
authorMike Snitzer <snitzer@redhat.com>
Tue, 30 Jun 2009 14:18:17 +0000 (15:18 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Tue, 30 Jun 2009 14:18:17 +0000 (15:18 +0100)
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: Mike Snitzer <snitzer@redhat.com>
Reported-by: Frans Pop <elendil@planet.nl>
Tested-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-table.c

index 4899ebe767c86d342853397e23530cb3b0ea9eea..2cba557d9e61e10dad844dea12f134b4a4ee0d11 100644 (file)
@@ -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));