diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/dm-table.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 8939e6105088..5a7eb650181e 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c | |||
@@ -102,6 +102,8 @@ static void combine_restrictions_low(struct io_restrictions *lhs, | |||
102 | lhs->seg_boundary_mask = | 102 | lhs->seg_boundary_mask = |
103 | min_not_zero(lhs->seg_boundary_mask, rhs->seg_boundary_mask); | 103 | min_not_zero(lhs->seg_boundary_mask, rhs->seg_boundary_mask); |
104 | 104 | ||
105 | lhs->bounce_pfn = min_not_zero(lhs->bounce_pfn, rhs->bounce_pfn); | ||
106 | |||
105 | lhs->no_cluster |= rhs->no_cluster; | 107 | lhs->no_cluster |= rhs->no_cluster; |
106 | } | 108 | } |
107 | 109 | ||
@@ -566,6 +568,8 @@ void dm_set_device_limits(struct dm_target *ti, struct block_device *bdev) | |||
566 | min_not_zero(rs->seg_boundary_mask, | 568 | min_not_zero(rs->seg_boundary_mask, |
567 | q->seg_boundary_mask); | 569 | q->seg_boundary_mask); |
568 | 570 | ||
571 | rs->bounce_pfn = min_not_zero(rs->bounce_pfn, q->bounce_pfn); | ||
572 | |||
569 | rs->no_cluster |= !test_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags); | 573 | rs->no_cluster |= !test_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags); |
570 | } | 574 | } |
571 | EXPORT_SYMBOL_GPL(dm_set_device_limits); | 575 | EXPORT_SYMBOL_GPL(dm_set_device_limits); |
@@ -707,6 +711,8 @@ static void check_for_valid_limits(struct io_restrictions *rs) | |||
707 | rs->max_segment_size = MAX_SEGMENT_SIZE; | 711 | rs->max_segment_size = MAX_SEGMENT_SIZE; |
708 | if (!rs->seg_boundary_mask) | 712 | if (!rs->seg_boundary_mask) |
709 | rs->seg_boundary_mask = -1; | 713 | rs->seg_boundary_mask = -1; |
714 | if (!rs->bounce_pfn) | ||
715 | rs->bounce_pfn = -1; | ||
710 | } | 716 | } |
711 | 717 | ||
712 | int dm_table_add_target(struct dm_table *t, const char *type, | 718 | int dm_table_add_target(struct dm_table *t, const char *type, |
@@ -891,6 +897,7 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q) | |||
891 | q->hardsect_size = t->limits.hardsect_size; | 897 | q->hardsect_size = t->limits.hardsect_size; |
892 | q->max_segment_size = t->limits.max_segment_size; | 898 | q->max_segment_size = t->limits.max_segment_size; |
893 | q->seg_boundary_mask = t->limits.seg_boundary_mask; | 899 | q->seg_boundary_mask = t->limits.seg_boundary_mask; |
900 | q->bounce_pfn = t->limits.bounce_pfn; | ||
894 | if (t->limits.no_cluster) | 901 | if (t->limits.no_cluster) |
895 | q->queue_flags &= ~(1 << QUEUE_FLAG_CLUSTER); | 902 | q->queue_flags &= ~(1 << QUEUE_FLAG_CLUSTER); |
896 | else | 903 | else |