diff options
author | NeilBrown <neilb@suse.de> | 2012-02-12 22:24:05 -0500 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-02-12 22:24:05 -0500 |
commit | f53e29fc87b6fb76db0043202ec2c3450caa5ff3 (patch) | |
tree | b1f8705e420775a40ebb2f26132fe27184b82fbb /drivers/md/raid1.c | |
parent | db91ff55bdf06736b849afc1b1fce5763bbb8d5d (diff) |
md/raid1: fix buglet in md_raid1_contested.
Since we added 'replacement' capability, RAID1 can have twice
as many devices as ->raid_disks indicates.
So md_raid1_congested needs to check that many possible devices,
not just ->raid_disks many.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index a368db2431a5..a0b225eb4ac4 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -624,7 +624,7 @@ int md_raid1_congested(struct mddev *mddev, int bits) | |||
624 | return 1; | 624 | return 1; |
625 | 625 | ||
626 | rcu_read_lock(); | 626 | rcu_read_lock(); |
627 | for (i = 0; i < conf->raid_disks; i++) { | 627 | for (i = 0; i < conf->raid_disks * 2; i++) { |
628 | struct md_rdev *rdev = rcu_dereference(conf->mirrors[i].rdev); | 628 | struct md_rdev *rdev = rcu_dereference(conf->mirrors[i].rdev); |
629 | if (rdev && !test_bit(Faulty, &rdev->flags)) { | 629 | if (rdev && !test_bit(Faulty, &rdev->flags)) { |
630 | struct request_queue *q = bdev_get_queue(rdev->bdev); | 630 | struct request_queue *q = bdev_get_queue(rdev->bdev); |