Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284444
b: refs/heads/master
c: e11b05d
h: refs/heads/master
v: v3
  • Loading branch information
Sage Weil committed Jan 10, 2012
1 parent da23342 commit 4af2371
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 3d8eb7a94e8f25a33362f708974ac7daae9e84f8
refs/heads/master: e11b05d31f21f0ea39ea288af667887cd6c21c80
11 changes: 8 additions & 3 deletions trunk/net/ceph/crush/mapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,10 +510,15 @@ int crush_do_rule(struct crush_map *map,
switch (rule->steps[step].op) {
case CRUSH_RULE_TAKE:
w[0] = rule->steps[step].arg1;
if (force_pos >= 0) {
BUG_ON(force_context[force_pos] != w[0]);

/* find position in force_context/hierarchy */
while (force_pos >= 0 &&
force_context[force_pos] != w[0])
force_pos--;
}
/* and move past it */
if (force_pos >= 0)
force_pos--;

wsize = 1;
break;

Expand Down

0 comments on commit 4af2371

Please sign in to comment.