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/faulty.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/faulty.c')
-rw-r--r-- | drivers/md/faulty.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/md/faulty.c b/drivers/md/faulty.c index 23078dabb6df..5ef304d4341c 100644 --- a/drivers/md/faulty.c +++ b/drivers/md/faulty.c | |||
@@ -169,7 +169,7 @@ static void add_sector(conf_t *conf, sector_t start, int mode) | |||
169 | conf->nfaults = n+1; | 169 | conf->nfaults = n+1; |
170 | } | 170 | } |
171 | 171 | ||
172 | static int make_request(mddev_t *mddev, struct bio *bio) | 172 | static void make_request(mddev_t *mddev, struct bio *bio) |
173 | { | 173 | { |
174 | conf_t *conf = mddev->private; | 174 | conf_t *conf = mddev->private; |
175 | int failit = 0; | 175 | int failit = 0; |
@@ -181,7 +181,7 @@ static int make_request(mddev_t *mddev, struct bio *bio) | |||
181 | * just fail immediately | 181 | * just fail immediately |
182 | */ | 182 | */ |
183 | bio_endio(bio, -EIO); | 183 | bio_endio(bio, -EIO); |
184 | return 0; | 184 | return; |
185 | } | 185 | } |
186 | 186 | ||
187 | if (check_sector(conf, bio->bi_sector, bio->bi_sector+(bio->bi_size>>9), | 187 | if (check_sector(conf, bio->bi_sector, bio->bi_sector+(bio->bi_size>>9), |
@@ -211,15 +211,15 @@ static int make_request(mddev_t *mddev, struct bio *bio) | |||
211 | } | 211 | } |
212 | if (failit) { | 212 | if (failit) { |
213 | struct bio *b = bio_clone_mddev(bio, GFP_NOIO, mddev); | 213 | struct bio *b = bio_clone_mddev(bio, GFP_NOIO, mddev); |
214 | |||
214 | b->bi_bdev = conf->rdev->bdev; | 215 | b->bi_bdev = conf->rdev->bdev; |
215 | b->bi_private = bio; | 216 | b->bi_private = bio; |
216 | b->bi_end_io = faulty_fail; | 217 | b->bi_end_io = faulty_fail; |
217 | generic_make_request(b); | 218 | bio = b; |
218 | return 0; | 219 | } else |
219 | } else { | ||
220 | bio->bi_bdev = conf->rdev->bdev; | 220 | bio->bi_bdev = conf->rdev->bdev; |
221 | return 1; | 221 | |
222 | } | 222 | generic_make_request(bio); |
223 | } | 223 | } |
224 | 224 | ||
225 | static void status(struct seq_file *seq, mddev_t *mddev) | 225 | static void status(struct seq_file *seq, mddev_t *mddev) |