diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-09-12 06:12:01 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2011-09-12 06:12:01 -0400 |
commit | 5a7bbad27a410350e64a2d7f5ec18fc73836c14f (patch) | |
tree | 3447cd62dbcbd77b4071e2eb7576f1d7632ef2d3 /drivers/md/multipath.c | |
parent | c20e8de27fef9f59869c81c288ad6cf28200e00c (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/multipath.c')
-rw-r--r-- | drivers/md/multipath.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index 3535c23af288..407cb5691425 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c | |||
@@ -106,7 +106,7 @@ static void multipath_end_request(struct bio *bio, int error) | |||
106 | rdev_dec_pending(rdev, conf->mddev); | 106 | rdev_dec_pending(rdev, conf->mddev); |
107 | } | 107 | } |
108 | 108 | ||
109 | static int multipath_make_request(mddev_t *mddev, struct bio * bio) | 109 | static void multipath_make_request(mddev_t *mddev, struct bio * bio) |
110 | { | 110 | { |
111 | multipath_conf_t *conf = mddev->private; | 111 | multipath_conf_t *conf = mddev->private; |
112 | struct multipath_bh * mp_bh; | 112 | struct multipath_bh * mp_bh; |
@@ -114,7 +114,7 @@ static int multipath_make_request(mddev_t *mddev, struct bio * bio) | |||
114 | 114 | ||
115 | if (unlikely(bio->bi_rw & REQ_FLUSH)) { | 115 | if (unlikely(bio->bi_rw & REQ_FLUSH)) { |
116 | md_flush_request(mddev, bio); | 116 | md_flush_request(mddev, bio); |
117 | return 0; | 117 | return; |
118 | } | 118 | } |
119 | 119 | ||
120 | mp_bh = mempool_alloc(conf->pool, GFP_NOIO); | 120 | mp_bh = mempool_alloc(conf->pool, GFP_NOIO); |
@@ -126,7 +126,7 @@ static int multipath_make_request(mddev_t *mddev, struct bio * bio) | |||
126 | if (mp_bh->path < 0) { | 126 | if (mp_bh->path < 0) { |
127 | bio_endio(bio, -EIO); | 127 | bio_endio(bio, -EIO); |
128 | mempool_free(mp_bh, conf->pool); | 128 | mempool_free(mp_bh, conf->pool); |
129 | return 0; | 129 | return; |
130 | } | 130 | } |
131 | multipath = conf->multipaths + mp_bh->path; | 131 | multipath = conf->multipaths + mp_bh->path; |
132 | 132 | ||
@@ -137,7 +137,7 @@ static int multipath_make_request(mddev_t *mddev, struct bio * bio) | |||
137 | mp_bh->bio.bi_end_io = multipath_end_request; | 137 | mp_bh->bio.bi_end_io = multipath_end_request; |
138 | mp_bh->bio.bi_private = mp_bh; | 138 | mp_bh->bio.bi_private = mp_bh; |
139 | generic_make_request(&mp_bh->bio); | 139 | generic_make_request(&mp_bh->bio); |
140 | return 0; | 140 | return; |
141 | } | 141 | } |
142 | 142 | ||
143 | static void multipath_status (struct seq_file *seq, mddev_t *mddev) | 143 | static void multipath_status (struct seq_file *seq, mddev_t *mddev) |