Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73104
b: refs/heads/master
c: 5ec140e
h: refs/heads/master
v: v3
  • Loading branch information
Vasily Averin authored and Jens Axboe committed Nov 2, 2007
1 parent b01efec commit 2ec444b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6f5d8aa6382eef2b26032c88656270bdae7f0c42
refs/heads/master: 5ec140e600b7d6624c657f008833f0e71bd5ef48
7 changes: 7 additions & 0 deletions trunk/drivers/md/dm-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ static void combine_restrictions_low(struct io_restrictions *lhs,
lhs->seg_boundary_mask =
min_not_zero(lhs->seg_boundary_mask, rhs->seg_boundary_mask);

lhs->bounce_pfn = min_not_zero(lhs->bounce_pfn, rhs->bounce_pfn);

lhs->no_cluster |= rhs->no_cluster;
}

Expand Down Expand Up @@ -566,6 +568,8 @@ void dm_set_device_limits(struct dm_target *ti, struct block_device *bdev)
min_not_zero(rs->seg_boundary_mask,
q->seg_boundary_mask);

rs->bounce_pfn = min_not_zero(rs->bounce_pfn, q->bounce_pfn);

rs->no_cluster |= !test_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags);
}
EXPORT_SYMBOL_GPL(dm_set_device_limits);
Expand Down Expand Up @@ -707,6 +711,8 @@ static void check_for_valid_limits(struct io_restrictions *rs)
rs->max_segment_size = MAX_SEGMENT_SIZE;
if (!rs->seg_boundary_mask)
rs->seg_boundary_mask = -1;
if (!rs->bounce_pfn)
rs->bounce_pfn = -1;
}

int dm_table_add_target(struct dm_table *t, const char *type,
Expand Down Expand Up @@ -891,6 +897,7 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q)
q->hardsect_size = t->limits.hardsect_size;
q->max_segment_size = t->limits.max_segment_size;
q->seg_boundary_mask = t->limits.seg_boundary_mask;
q->bounce_pfn = t->limits.bounce_pfn;
if (t->limits.no_cluster)
q->queue_flags &= ~(1 << QUEUE_FLAG_CLUSTER);
else
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/device-mapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ struct io_restrictions {
unsigned short hardsect_size;
unsigned int max_segment_size;
unsigned long seg_boundary_mask;
unsigned long bounce_pfn;
unsigned char no_cluster; /* inverted so that 0 is default */
};

Expand Down

0 comments on commit 2ec444b

Please sign in to comment.