Re: [2.6.31-rc1] device-mapper: target device sda6 is misaligned

From: Frans Pop
Date: Thu Jun 25 2009 - 14:52:59 EST


On Thursday 25 June 2009, Mike Snitzer wrote:
> OK, I found a really stupid bug. I was passing the data start offset
> (pe_start) through to blk_stack_limits() in terms of sectors rather
> than bytes. The following should silence your warnings:

Yes, all clear again. So not broken userspace after all ;-)

Reported-by: Frans Pop <elendil@xxxxxxxxx>
Tested-by: Frans Pop <elendil@xxxxxxxxx>

Thanks,
FJP

> diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
> index 4899ebe..2cba557 100644
> --- a/drivers/md/dm-table.c
> +++ b/drivers/md/dm-table.c
> @@ -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));

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/