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