diff options
author | David S. Miller <davem@davemloft.net> | 2010-01-23 03:31:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-23 03:31:06 -0500 |
commit | 51c24aaacaea90c8e87f1dec75a2ac7622b593f8 (patch) | |
tree | 9f54936c87764bef75e97395cb56b7d1e0df24c6 /drivers/md/dm-table.c | |
parent | 4276e47e2d1c85a2477caf0d22b91c4f2377fba8 (diff) | |
parent | 6be325719b3e54624397e413efd4b33a997e55a3 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers/md/dm-table.c')
-rw-r--r-- | drivers/md/dm-table.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index be625475cf6d..4b22feb01a0c 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c | |||
@@ -503,16 +503,15 @@ int dm_set_device_limits(struct dm_target *ti, struct dm_dev *dev, | |||
503 | return 0; | 503 | return 0; |
504 | } | 504 | } |
505 | 505 | ||
506 | if (blk_stack_limits(limits, &q->limits, start << 9) < 0) | 506 | if (bdev_stack_limits(limits, bdev, start) < 0) |
507 | DMWARN("%s: target device %s is misaligned: " | 507 | DMWARN("%s: adding target device %s caused an alignment inconsistency: " |
508 | "physical_block_size=%u, logical_block_size=%u, " | 508 | "physical_block_size=%u, logical_block_size=%u, " |
509 | "alignment_offset=%u, start=%llu", | 509 | "alignment_offset=%u, start=%llu", |
510 | dm_device_name(ti->table->md), bdevname(bdev, b), | 510 | dm_device_name(ti->table->md), bdevname(bdev, b), |
511 | q->limits.physical_block_size, | 511 | q->limits.physical_block_size, |
512 | q->limits.logical_block_size, | 512 | q->limits.logical_block_size, |
513 | q->limits.alignment_offset, | 513 | q->limits.alignment_offset, |
514 | (unsigned long long) start << 9); | 514 | (unsigned long long) start << SECTOR_SHIFT); |
515 | |||
516 | 515 | ||
517 | /* | 516 | /* |
518 | * Check if merge fn is supported. | 517 | * Check if merge fn is supported. |
@@ -1026,9 +1025,9 @@ combine_limits: | |||
1026 | * for the table. | 1025 | * for the table. |
1027 | */ | 1026 | */ |
1028 | if (blk_stack_limits(limits, &ti_limits, 0) < 0) | 1027 | if (blk_stack_limits(limits, &ti_limits, 0) < 0) |
1029 | DMWARN("%s: target device " | 1028 | DMWARN("%s: adding target device " |
1030 | "(start sect %llu len %llu) " | 1029 | "(start sect %llu len %llu) " |
1031 | "is misaligned", | 1030 | "caused an alignment inconsistency", |
1032 | dm_device_name(table->md), | 1031 | dm_device_name(table->md), |
1033 | (unsigned long long) ti->begin, | 1032 | (unsigned long long) ti->begin, |
1034 | (unsigned long long) ti->len); | 1033 | (unsigned long long) ti->len); |
@@ -1080,15 +1079,6 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q, | |||
1080 | struct queue_limits *limits) | 1079 | struct queue_limits *limits) |
1081 | { | 1080 | { |
1082 | /* | 1081 | /* |
1083 | * Each target device in the table has a data area that should normally | ||
1084 | * be aligned such that the DM device's alignment_offset is 0. | ||
1085 | * FIXME: Propagate alignment_offsets up the stack and warn of | ||
1086 | * sub-optimal or inconsistent settings. | ||
1087 | */ | ||
1088 | limits->alignment_offset = 0; | ||
1089 | limits->misaligned = 0; | ||
1090 | |||
1091 | /* | ||
1092 | * Copy table's limits to the DM device's request_queue | 1082 | * Copy table's limits to the DM device's request_queue |
1093 | */ | 1083 | */ |
1094 | q->limits = *limits; | 1084 | q->limits = *limits; |