diff options
Diffstat (limited to 'drivers/md/linear.c')
-rw-r--r-- | drivers/md/linear.c | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c index ba19060bcf3f..abfb59a61ede 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c | |||
@@ -87,22 +87,6 @@ static int linear_mergeable_bvec(struct request_queue *q, | |||
87 | return maxsectors << 9; | 87 | return maxsectors << 9; |
88 | } | 88 | } |
89 | 89 | ||
90 | static void linear_unplug(struct request_queue *q) | ||
91 | { | ||
92 | mddev_t *mddev = q->queuedata; | ||
93 | linear_conf_t *conf; | ||
94 | int i; | ||
95 | |||
96 | rcu_read_lock(); | ||
97 | conf = rcu_dereference(mddev->private); | ||
98 | |||
99 | for (i=0; i < mddev->raid_disks; i++) { | ||
100 | struct request_queue *r_queue = bdev_get_queue(conf->disks[i].rdev->bdev); | ||
101 | blk_unplug(r_queue); | ||
102 | } | ||
103 | rcu_read_unlock(); | ||
104 | } | ||
105 | |||
106 | static int linear_congested(void *data, int bits) | 90 | static int linear_congested(void *data, int bits) |
107 | { | 91 | { |
108 | mddev_t *mddev = data; | 92 | mddev_t *mddev = data; |
@@ -216,7 +200,6 @@ static int linear_run (mddev_t *mddev) | |||
216 | 200 | ||
217 | if (md_check_no_bitmap(mddev)) | 201 | if (md_check_no_bitmap(mddev)) |
218 | return -EINVAL; | 202 | return -EINVAL; |
219 | mddev->queue->queue_lock = &mddev->queue->__queue_lock; | ||
220 | conf = linear_conf(mddev, mddev->raid_disks); | 203 | conf = linear_conf(mddev, mddev->raid_disks); |
221 | 204 | ||
222 | if (!conf) | 205 | if (!conf) |
@@ -225,11 +208,9 @@ static int linear_run (mddev_t *mddev) | |||
225 | md_set_array_sectors(mddev, linear_size(mddev, 0, 0)); | 208 | md_set_array_sectors(mddev, linear_size(mddev, 0, 0)); |
226 | 209 | ||
227 | blk_queue_merge_bvec(mddev->queue, linear_mergeable_bvec); | 210 | blk_queue_merge_bvec(mddev->queue, linear_mergeable_bvec); |
228 | mddev->queue->unplug_fn = linear_unplug; | ||
229 | mddev->queue->backing_dev_info.congested_fn = linear_congested; | 211 | mddev->queue->backing_dev_info.congested_fn = linear_congested; |
230 | mddev->queue->backing_dev_info.congested_data = mddev; | 212 | mddev->queue->backing_dev_info.congested_data = mddev; |
231 | md_integrity_register(mddev); | 213 | return md_integrity_register(mddev); |
232 | return 0; | ||
233 | } | 214 | } |
234 | 215 | ||
235 | static void free_conf(struct rcu_head *head) | 216 | static void free_conf(struct rcu_head *head) |
@@ -294,8 +275,8 @@ static int linear_make_request (mddev_t *mddev, struct bio *bio) | |||
294 | dev_info_t *tmp_dev; | 275 | dev_info_t *tmp_dev; |
295 | sector_t start_sector; | 276 | sector_t start_sector; |
296 | 277 | ||
297 | if (unlikely(bio->bi_rw & REQ_HARDBARRIER)) { | 278 | if (unlikely(bio->bi_rw & REQ_FLUSH)) { |
298 | md_barrier_request(mddev, bio); | 279 | md_flush_request(mddev, bio); |
299 | return 0; | 280 | return 0; |
300 | } | 281 | } |
301 | 282 | ||