aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid10.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 13:09:16 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 13:09:16 -0400
commit92d15c2ccbb3e31a3fc71ad28fdb55e1319383c0 (patch)
tree8d83c0dc3c6b935d8367e331872f242b742f0a8a /drivers/md/raid10.c
parentf20bf6125605acbbc7eb8c9420d7221c91aa83eb (diff)
parent644bd2f048972d75eb1979b1fdca257d528ce687 (diff)
Merge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block: (63 commits) Fix memory leak in dm-crypt SPARC64: sg chaining support SPARC: sg chaining support PPC: sg chaining support PS3: sg chaining support IA64: sg chaining support x86-64: enable sg chaining x86-64: update pci-gart iommu to sg helpers x86-64: update nommu to sg helpers x86-64: update calgary iommu to sg helpers swiotlb: sg chaining support i386: enable sg chaining i386 dma_map_sg: convert to using sg helpers mmc: need to zero sglist on init Panic in blk_rq_map_sg() from CCISS driver remove sglist_len remove blk_queue_max_phys_segments in libata revert sg segment size ifdefs Fixup u14-34f ENABLE_SG_CHAINING qla1280: enable use_sg_chaining option ...
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r--drivers/md/raid10.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 25a96c42bdb0..fc6607acb6e4 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -611,36 +611,6 @@ static void raid10_unplug(struct request_queue *q)
611 md_wakeup_thread(mddev->thread); 611 md_wakeup_thread(mddev->thread);
612} 612}
613 613
614static int raid10_issue_flush(struct request_queue *q, struct gendisk *disk,
615 sector_t *error_sector)
616{
617 mddev_t *mddev = q->queuedata;
618 conf_t *conf = mddev_to_conf(mddev);
619 int i, ret = 0;
620
621 rcu_read_lock();
622 for (i=0; i<mddev->raid_disks && ret == 0; i++) {
623 mdk_rdev_t *rdev = rcu_dereference(conf->mirrors[i].rdev);
624 if (rdev && !test_bit(Faulty, &rdev->flags)) {
625 struct block_device *bdev = rdev->bdev;
626 struct request_queue *r_queue = bdev_get_queue(bdev);
627
628 if (!r_queue->issue_flush_fn)
629 ret = -EOPNOTSUPP;
630 else {
631 atomic_inc(&rdev->nr_pending);
632 rcu_read_unlock();
633 ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk,
634 error_sector);
635 rdev_dec_pending(rdev, mddev);
636 rcu_read_lock();
637 }
638 }
639 }
640 rcu_read_unlock();
641 return ret;
642}
643
644static int raid10_congested(void *data, int bits) 614static int raid10_congested(void *data, int bits)
645{ 615{
646 mddev_t *mddev = data; 616 mddev_t *mddev = data;
@@ -2118,7 +2088,6 @@ static int run(mddev_t *mddev)
2118 mddev->resync_max_sectors = size << conf->chunk_shift; 2088 mddev->resync_max_sectors = size << conf->chunk_shift;
2119 2089
2120 mddev->queue->unplug_fn = raid10_unplug; 2090 mddev->queue->unplug_fn = raid10_unplug;
2121 mddev->queue->issue_flush_fn = raid10_issue_flush;
2122 mddev->queue->backing_dev_info.congested_fn = raid10_congested; 2091 mddev->queue->backing_dev_info.congested_fn = raid10_congested;
2123 mddev->queue->backing_dev_info.congested_data = mddev; 2092 mddev->queue->backing_dev_info.congested_data = mddev;
2124 2093