aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-09-12 06:12:01 -0400
committerJens Axboe <jaxboe@fusionio.com>2011-09-12 06:12:01 -0400
commit5a7bbad27a410350e64a2d7f5ec18fc73836c14f (patch)
tree3447cd62dbcbd77b4071e2eb7576f1d7632ef2d3 /drivers/md/raid5.c
parentc20e8de27fef9f59869c81c288ad6cf28200e00c (diff)
block: remove support for bio remapping from ->make_request
There is very little benefit in allowing to let a ->make_request instance update the bios device and sector and loop around it in __generic_make_request when we can archive the same through calling generic_make_request from the driver and letting the loop in generic_make_request handle it. Note that various drivers got the return value from ->make_request and returned non-zero values for errors. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: NeilBrown <neilb@suse.de> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index dbae459fb02d..96b7f6a1b6f2 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -3695,7 +3695,7 @@ static struct stripe_head *__get_priority_stripe(raid5_conf_t *conf)
3695 return sh; 3695 return sh;
3696} 3696}
3697 3697
3698static int make_request(mddev_t *mddev, struct bio * bi) 3698static void make_request(mddev_t *mddev, struct bio * bi)
3699{ 3699{
3700 raid5_conf_t *conf = mddev->private; 3700 raid5_conf_t *conf = mddev->private;
3701 int dd_idx; 3701 int dd_idx;
@@ -3708,7 +3708,7 @@ static int make_request(mddev_t *mddev, struct bio * bi)
3708 3708
3709 if (unlikely(bi->bi_rw & REQ_FLUSH)) { 3709 if (unlikely(bi->bi_rw & REQ_FLUSH)) {
3710 md_flush_request(mddev, bi); 3710 md_flush_request(mddev, bi);
3711 return 0; 3711 return;
3712 } 3712 }
3713 3713
3714 md_write_start(mddev, bi); 3714 md_write_start(mddev, bi);
@@ -3716,7 +3716,7 @@ static int make_request(mddev_t *mddev, struct bio * bi)
3716 if (rw == READ && 3716 if (rw == READ &&
3717 mddev->reshape_position == MaxSector && 3717 mddev->reshape_position == MaxSector &&
3718 chunk_aligned_read(mddev,bi)) 3718 chunk_aligned_read(mddev,bi))
3719 return 0; 3719 return;
3720 3720
3721 logical_sector = bi->bi_sector & ~((sector_t)STRIPE_SECTORS-1); 3721 logical_sector = bi->bi_sector & ~((sector_t)STRIPE_SECTORS-1);
3722 last_sector = bi->bi_sector + (bi->bi_size>>9); 3722 last_sector = bi->bi_sector + (bi->bi_size>>9);
@@ -3851,8 +3851,6 @@ static int make_request(mddev_t *mddev, struct bio * bi)
3851 3851
3852 bio_endio(bi, 0); 3852 bio_endio(bi, 0);
3853 } 3853 }
3854
3855 return 0;
3856} 3854}
3857 3855
3858static sector_t raid5_size(mddev_t *mddev, sector_t sectors, int raid_disks); 3856static sector_t raid5_size(mddev_t *mddev, sector_t sectors, int raid_disks);