Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323189
b: refs/heads/master
c: 80b4812
h: refs/heads/master
i:
  323187: 3498c25
v: v3
  • Loading branch information
NeilBrown committed Sep 27, 2012
1 parent 07164b1 commit 226e6ab
Show file tree
Hide file tree
Showing 2 changed files with 6 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: cb13ff69d6d61ab06285e3ef652f45ecda73e135
refs/heads/master: 80b4812407c6b1f66a4f2430e69747a13f010839
8 changes: 5 additions & 3 deletions trunk/drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -1512,14 +1512,16 @@ static int _enough(struct r10conf *conf, struct geom *geo, int ignore)
do {
int n = conf->copies;
int cnt = 0;
int this = first;
while (n--) {
if (conf->mirrors[first].rdev &&
first != ignore)
if (conf->mirrors[this].rdev &&
this != ignore)
cnt++;
first = (first+1) % geo->raid_disks;
this = (this+1) % geo->raid_disks;
}
if (cnt == 0)
return 0;
first = (first + geo->near_copies) % geo->raid_disks;
} while (first != 0);
return 1;
}
Expand Down

0 comments on commit 226e6ab

Please sign in to comment.