diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-04 20:06:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-04 20:06:58 -0400 |
commit | b4fdcb02f1e39c27058a885905bd0277370ba441 (patch) | |
tree | fd4cfd1994f21f44afe5e7904681fb5ac09f81b8 /drivers/md/raid10.c | |
parent | 044595d4e448305fbaec472eb7d22636d24e7d8c (diff) | |
parent | 6dd9ad7df2019b1e33a372a501907db293ebcd0d (diff) |
Merge branch 'for-3.2/core' of git://git.kernel.dk/linux-block
* 'for-3.2/core' of git://git.kernel.dk/linux-block: (29 commits)
block: don't call blk_drain_queue() if elevator is not up
blk-throttle: use queue_is_locked() instead of lockdep_is_held()
blk-throttle: Take blkcg->lock while traversing blkcg->policy_list
blk-throttle: Free up policy node associated with deleted rule
block: warn if tag is greater than real_max_depth.
block: make gendisk hold a reference to its queue
blk-flush: move the queue kick into
blk-flush: fix invalid BUG_ON in blk_insert_flush
block: Remove the control of complete cpu from bio.
block: fix a typo in the blk-cgroup.h file
block: initialize the bounce pool if high memory may be added later
block: fix request_queue lifetime handling by making blk_queue_cleanup() properly shutdown
block: drop @tsk from attempt_plug_merge() and explain sync rules
block: make get_request[_wait]() fail if queue is dead
block: reorganize throtl_get_tg() and blk_throtl_bio()
block: reorganize queue draining
block: drop unnecessary blk_get/put_queue() in scsi_cmd_ioctl() and blk_get_tg()
block: pass around REQ_* flags instead of broken down booleans during request alloc/free
block: move blk_throtl prototypes to block/blk.h
block: fix genhd refcounting in blkio_policy_parse_and_set()
...
Fix up trivial conflicts due to "mddev_t" -> "struct mddev" conversion
and making the request functions be of type "void" instead of "int" in
- drivers/md/{faulty.c,linear.c,md.c,md.h,multipath.c,raid0.c,raid1.c,raid10.c,raid5.c}
- drivers/staging/zram/zram_drv.c
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r-- | drivers/md/raid10.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index c025a8276dc1..dde6dd4b47ec 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
@@ -842,7 +842,7 @@ static void unfreeze_array(struct r10conf *conf) | |||
842 | spin_unlock_irq(&conf->resync_lock); | 842 | spin_unlock_irq(&conf->resync_lock); |
843 | } | 843 | } |
844 | 844 | ||
845 | static int make_request(struct mddev *mddev, struct bio * bio) | 845 | static void make_request(struct mddev *mddev, struct bio * bio) |
846 | { | 846 | { |
847 | struct r10conf *conf = mddev->private; | 847 | struct r10conf *conf = mddev->private; |
848 | struct mirror_info *mirror; | 848 | struct mirror_info *mirror; |
@@ -861,7 +861,7 @@ static int make_request(struct mddev *mddev, struct bio * bio) | |||
861 | 861 | ||
862 | if (unlikely(bio->bi_rw & REQ_FLUSH)) { | 862 | if (unlikely(bio->bi_rw & REQ_FLUSH)) { |
863 | md_flush_request(mddev, bio); | 863 | md_flush_request(mddev, bio); |
864 | return 0; | 864 | return; |
865 | } | 865 | } |
866 | 866 | ||
867 | /* If this request crosses a chunk boundary, we need to | 867 | /* If this request crosses a chunk boundary, we need to |
@@ -893,10 +893,8 @@ static int make_request(struct mddev *mddev, struct bio * bio) | |||
893 | conf->nr_waiting++; | 893 | conf->nr_waiting++; |
894 | spin_unlock_irq(&conf->resync_lock); | 894 | spin_unlock_irq(&conf->resync_lock); |
895 | 895 | ||
896 | if (make_request(mddev, &bp->bio1)) | 896 | make_request(mddev, &bp->bio1); |
897 | generic_make_request(&bp->bio1); | 897 | make_request(mddev, &bp->bio2); |
898 | if (make_request(mddev, &bp->bio2)) | ||
899 | generic_make_request(&bp->bio2); | ||
900 | 898 | ||
901 | spin_lock_irq(&conf->resync_lock); | 899 | spin_lock_irq(&conf->resync_lock); |
902 | conf->nr_waiting--; | 900 | conf->nr_waiting--; |
@@ -904,14 +902,14 @@ static int make_request(struct mddev *mddev, struct bio * bio) | |||
904 | spin_unlock_irq(&conf->resync_lock); | 902 | spin_unlock_irq(&conf->resync_lock); |
905 | 903 | ||
906 | bio_pair_release(bp); | 904 | bio_pair_release(bp); |
907 | return 0; | 905 | return; |
908 | bad_map: | 906 | bad_map: |
909 | printk("md/raid10:%s: make_request bug: can't convert block across chunks" | 907 | printk("md/raid10:%s: make_request bug: can't convert block across chunks" |
910 | " or bigger than %dk %llu %d\n", mdname(mddev), chunk_sects/2, | 908 | " or bigger than %dk %llu %d\n", mdname(mddev), chunk_sects/2, |
911 | (unsigned long long)bio->bi_sector, bio->bi_size >> 10); | 909 | (unsigned long long)bio->bi_sector, bio->bi_size >> 10); |
912 | 910 | ||
913 | bio_io_error(bio); | 911 | bio_io_error(bio); |
914 | return 0; | 912 | return; |
915 | } | 913 | } |
916 | 914 | ||
917 | md_write_start(mddev, bio); | 915 | md_write_start(mddev, bio); |
@@ -954,7 +952,7 @@ read_again: | |||
954 | slot = r10_bio->read_slot; | 952 | slot = r10_bio->read_slot; |
955 | if (disk < 0) { | 953 | if (disk < 0) { |
956 | raid_end_bio_io(r10_bio); | 954 | raid_end_bio_io(r10_bio); |
957 | return 0; | 955 | return; |
958 | } | 956 | } |
959 | mirror = conf->mirrors + disk; | 957 | mirror = conf->mirrors + disk; |
960 | 958 | ||
@@ -1002,7 +1000,7 @@ read_again: | |||
1002 | goto read_again; | 1000 | goto read_again; |
1003 | } else | 1001 | } else |
1004 | generic_make_request(read_bio); | 1002 | generic_make_request(read_bio); |
1005 | return 0; | 1003 | return; |
1006 | } | 1004 | } |
1007 | 1005 | ||
1008 | /* | 1006 | /* |
@@ -1176,7 +1174,6 @@ retry_write: | |||
1176 | 1174 | ||
1177 | if (do_sync || !mddev->bitmap || !plugged) | 1175 | if (do_sync || !mddev->bitmap || !plugged) |
1178 | md_wakeup_thread(mddev->thread); | 1176 | md_wakeup_thread(mddev->thread); |
1179 | return 0; | ||
1180 | } | 1177 | } |
1181 | 1178 | ||
1182 | static void status(struct seq_file *seq, struct mddev *mddev) | 1179 | static void status(struct seq_file *seq, struct mddev *mddev) |