Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24390
b: refs/heads/master
c: 969429b
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Mar 27, 2006
1 parent b0c2f61 commit 2dfd9cc
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: 4ee218cd67b385759993a6c840ea45f0ee0a8b30
refs/heads/master: 969429b504ae866d3f8b1cafd68a2c099e305093
9 changes: 9 additions & 0 deletions trunk/drivers/md/dm-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,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->no_cluster |= rhs->no_cluster;
}

/*
Expand Down Expand Up @@ -523,6 +525,8 @@ int dm_get_device(struct dm_target *ti, const char *path, sector_t start,
rs->seg_boundary_mask =
min_not_zero(rs->seg_boundary_mask,
q->seg_boundary_mask);

rs->no_cluster |= !test_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags);
}

return r;
Expand Down Expand Up @@ -832,6 +836,11 @@ 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;
if (t->limits.no_cluster)
q->queue_flags &= ~(1 << QUEUE_FLAG_CLUSTER);
else
q->queue_flags |= (1 << QUEUE_FLAG_CLUSTER);

}

unsigned int dm_table_get_num_targets(struct dm_table *t)
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 @@ -97,6 +97,7 @@ struct io_restrictions {
unsigned short hardsect_size;
unsigned int max_segment_size;
unsigned long seg_boundary_mask;
unsigned char no_cluster; /* inverted so that 0 is default */
};

struct dm_target {
Expand Down

0 comments on commit 2dfd9cc

Please sign in to comment.