Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75105
b: refs/heads/master
c: 9121250
h: refs/heads/master
i:
  75103: 7ad599a
v: v3
  • Loading branch information
Neil Brown authored and Alasdair G Kergon committed Dec 20, 2007
1 parent eb4384c commit 6f6191d
Show file tree
Hide file tree
Showing 3 changed files with 11 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: 69267a30bed1fabec658058c63845528a8b813d4
refs/heads/master: 91212507f93778c09d4c1335207b6f4b995f5ad1
9 changes: 9 additions & 0 deletions trunk/drivers/md/dm-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ static void combine_restrictions_low(struct io_restrictions *lhs,
lhs->max_segment_size =
min_not_zero(lhs->max_segment_size, rhs->max_segment_size);

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

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

Expand Down Expand Up @@ -566,6 +569,9 @@ void dm_set_device_limits(struct dm_target *ti, struct block_device *bdev)
rs->max_segment_size =
min_not_zero(rs->max_segment_size, q->max_segment_size);

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

rs->seg_boundary_mask =
min_not_zero(rs->seg_boundary_mask,
q->seg_boundary_mask);
Expand Down Expand Up @@ -703,6 +709,8 @@ static void check_for_valid_limits(struct io_restrictions *rs)
{
if (!rs->max_sectors)
rs->max_sectors = SAFE_MAX_SECTORS;
if (!rs->max_hw_sectors)
rs->max_hw_sectors = SAFE_MAX_SECTORS;
if (!rs->max_phys_segments)
rs->max_phys_segments = MAX_PHYS_SEGMENTS;
if (!rs->max_hw_segments)
Expand Down Expand Up @@ -901,6 +909,7 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q)
q->max_hw_segments = t->limits.max_hw_segments;
q->hardsect_size = t->limits.hardsect_size;
q->max_segment_size = t->limits.max_segment_size;
q->max_hw_sectors = t->limits.max_hw_sectors;
q->seg_boundary_mask = t->limits.seg_boundary_mask;
q->bounce_pfn = t->limits.bounce_pfn;
if (t->limits.no_cluster)
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 @@ -115,6 +115,7 @@ struct io_restrictions {
unsigned short max_hw_segments;
unsigned short hardsect_size;
unsigned int max_segment_size;
unsigned int max_hw_sectors;
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 6f6191d

Please sign in to comment.