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

Frans Pop elendil at planet.nl
Thu Jun 25 18:52:49 UTC 2009


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 at planet.nl>
Tested-by: Frans Pop <elendil at planet.nl>

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));




More information about the dm-devel mailing list