Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280520
b: refs/heads/master
c: 3019463
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown committed Dec 22, 2011
1 parent 1bb70e0 commit bd3f945
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b7044d41b5a09ce9082699f74c8f10e0fe59f704
refs/heads/master: 301946364e0aa67c4cfaec82e94c389993c9f7c6
7 changes: 4 additions & 3 deletions trunk/drivers/md/raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ static inline void update_head_pos(int disk, struct r1bio *r1_bio)
static int find_bio_disk(struct r1bio *r1_bio, struct bio *bio)
{
int mirror;
int raid_disks = r1_bio->mddev->raid_disks;
struct r1conf *conf = r1_bio->mddev->private;
int raid_disks = conf->raid_disks;

for (mirror = 0; mirror < raid_disks; mirror++)
if (r1_bio->bios[mirror] == bio)
Expand Down Expand Up @@ -609,7 +610,7 @@ int md_raid1_congested(struct mddev *mddev, int bits)
return 1;

rcu_read_lock();
for (i = 0; i < mddev->raid_disks; i++) {
for (i = 0; i < conf->raid_disks; i++) {
struct md_rdev *rdev = rcu_dereference(conf->mirrors[i].rdev);
if (rdev && !test_bit(Faulty, &rdev->flags)) {
struct request_queue *q = bdev_get_queue(rdev->bdev);
Expand Down Expand Up @@ -1286,7 +1287,7 @@ static int raid1_add_disk(struct mddev *mddev, struct md_rdev *rdev)
int mirror = 0;
struct mirror_info *p;
int first = 0;
int last = mddev->raid_disks - 1;
int last = conf->raid_disks - 1;

if (mddev->recovery_disabled == conf->recovery_disabled)
return -EBUSY;
Expand Down

0 comments on commit bd3f945

Please sign in to comment.