diff options
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r-- | drivers/md/raid0.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 0eb08a4df75..7294bd115e3 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/blkdev.h> | 21 | #include <linux/blkdev.h> |
22 | #include <linux/seq_file.h> | 22 | #include <linux/seq_file.h> |
23 | #include <linux/module.h> | ||
23 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
24 | #include "md.h" | 25 | #include "md.h" |
25 | #include "raid0.h" | 26 | #include "raid0.h" |
@@ -468,7 +469,7 @@ static inline int is_io_in_chunk_boundary(struct mddev *mddev, | |||
468 | } | 469 | } |
469 | } | 470 | } |
470 | 471 | ||
471 | static int raid0_make_request(struct mddev *mddev, struct bio *bio) | 472 | static void raid0_make_request(struct mddev *mddev, struct bio *bio) |
472 | { | 473 | { |
473 | unsigned int chunk_sects; | 474 | unsigned int chunk_sects; |
474 | sector_t sector_offset; | 475 | sector_t sector_offset; |
@@ -477,7 +478,7 @@ static int raid0_make_request(struct mddev *mddev, struct bio *bio) | |||
477 | 478 | ||
478 | if (unlikely(bio->bi_rw & REQ_FLUSH)) { | 479 | if (unlikely(bio->bi_rw & REQ_FLUSH)) { |
479 | md_flush_request(mddev, bio); | 480 | md_flush_request(mddev, bio); |
480 | return 0; | 481 | return; |
481 | } | 482 | } |
482 | 483 | ||
483 | chunk_sects = mddev->chunk_sectors; | 484 | chunk_sects = mddev->chunk_sectors; |
@@ -497,13 +498,10 @@ static int raid0_make_request(struct mddev *mddev, struct bio *bio) | |||
497 | else | 498 | else |
498 | bp = bio_split(bio, chunk_sects - | 499 | bp = bio_split(bio, chunk_sects - |
499 | sector_div(sector, chunk_sects)); | 500 | sector_div(sector, chunk_sects)); |
500 | if (raid0_make_request(mddev, &bp->bio1)) | 501 | raid0_make_request(mddev, &bp->bio1); |
501 | generic_make_request(&bp->bio1); | 502 | raid0_make_request(mddev, &bp->bio2); |
502 | if (raid0_make_request(mddev, &bp->bio2)) | ||
503 | generic_make_request(&bp->bio2); | ||
504 | |||
505 | bio_pair_release(bp); | 503 | bio_pair_release(bp); |
506 | return 0; | 504 | return; |
507 | } | 505 | } |
508 | 506 | ||
509 | sector_offset = bio->bi_sector; | 507 | sector_offset = bio->bi_sector; |
@@ -513,10 +511,9 @@ static int raid0_make_request(struct mddev *mddev, struct bio *bio) | |||
513 | bio->bi_bdev = tmp_dev->bdev; | 511 | bio->bi_bdev = tmp_dev->bdev; |
514 | bio->bi_sector = sector_offset + zone->dev_start + | 512 | bio->bi_sector = sector_offset + zone->dev_start + |
515 | tmp_dev->data_offset; | 513 | tmp_dev->data_offset; |
516 | /* | 514 | |
517 | * Let the main block layer submit the IO and resolve recursion: | 515 | generic_make_request(bio); |
518 | */ | 516 | return; |
519 | return 1; | ||
520 | 517 | ||
521 | bad_map: | 518 | bad_map: |
522 | printk("md/raid0:%s: make_request bug: can't convert block across chunks" | 519 | printk("md/raid0:%s: make_request bug: can't convert block across chunks" |
@@ -525,7 +522,7 @@ bad_map: | |||
525 | (unsigned long long)bio->bi_sector, bio->bi_size >> 10); | 522 | (unsigned long long)bio->bi_sector, bio->bi_size >> 10); |
526 | 523 | ||
527 | bio_io_error(bio); | 524 | bio_io_error(bio); |
528 | return 0; | 525 | return; |
529 | } | 526 | } |
530 | 527 | ||
531 | static void raid0_status(struct seq_file *seq, struct mddev *mddev) | 528 | static void raid0_status(struct seq_file *seq, struct mddev *mddev) |