diff options
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 6d03bea6fa58..0bcefad82413 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -567,36 +567,6 @@ static void raid1_unplug(struct request_queue *q) | |||
567 | md_wakeup_thread(mddev->thread); | 567 | md_wakeup_thread(mddev->thread); |
568 | } | 568 | } |
569 | 569 | ||
570 | static int raid1_issue_flush(struct request_queue *q, struct gendisk *disk, | ||
571 | sector_t *error_sector) | ||
572 | { | ||
573 | mddev_t *mddev = q->queuedata; | ||
574 | conf_t *conf = mddev_to_conf(mddev); | ||
575 | int i, ret = 0; | ||
576 | |||
577 | rcu_read_lock(); | ||
578 | for (i=0; i<mddev->raid_disks && ret == 0; i++) { | ||
579 | mdk_rdev_t *rdev = rcu_dereference(conf->mirrors[i].rdev); | ||
580 | if (rdev && !test_bit(Faulty, &rdev->flags)) { | ||
581 | struct block_device *bdev = rdev->bdev; | ||
582 | struct request_queue *r_queue = bdev_get_queue(bdev); | ||
583 | |||
584 | if (!r_queue->issue_flush_fn) | ||
585 | ret = -EOPNOTSUPP; | ||
586 | else { | ||
587 | atomic_inc(&rdev->nr_pending); | ||
588 | rcu_read_unlock(); | ||
589 | ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, | ||
590 | error_sector); | ||
591 | rdev_dec_pending(rdev, mddev); | ||
592 | rcu_read_lock(); | ||
593 | } | ||
594 | } | ||
595 | } | ||
596 | rcu_read_unlock(); | ||
597 | return ret; | ||
598 | } | ||
599 | |||
600 | static int raid1_congested(void *data, int bits) | 570 | static int raid1_congested(void *data, int bits) |
601 | { | 571 | { |
602 | mddev_t *mddev = data; | 572 | mddev_t *mddev = data; |
@@ -1997,7 +1967,6 @@ static int run(mddev_t *mddev) | |||
1997 | mddev->array_size = mddev->size; | 1967 | mddev->array_size = mddev->size; |
1998 | 1968 | ||
1999 | mddev->queue->unplug_fn = raid1_unplug; | 1969 | mddev->queue->unplug_fn = raid1_unplug; |
2000 | mddev->queue->issue_flush_fn = raid1_issue_flush; | ||
2001 | mddev->queue->backing_dev_info.congested_fn = raid1_congested; | 1970 | mddev->queue->backing_dev_info.congested_fn = raid1_congested; |
2002 | mddev->queue->backing_dev_info.congested_data = mddev; | 1971 | mddev->queue->backing_dev_info.congested_data = mddev; |
2003 | 1972 | ||