mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-26 18:43:33 -05:00
crush: fix force for non-root TAKE
Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
3d8eb7a94e
commit
e11b05d31f
1 changed files with 8 additions and 3 deletions
|
@ -510,10 +510,15 @@ int crush_do_rule(struct crush_map *map,
|
||||||
switch (rule->steps[step].op) {
|
switch (rule->steps[step].op) {
|
||||||
case CRUSH_RULE_TAKE:
|
case CRUSH_RULE_TAKE:
|
||||||
w[0] = rule->steps[step].arg1;
|
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--;
|
force_pos--;
|
||||||
}
|
/* and move past it */
|
||||||
|
if (force_pos >= 0)
|
||||||
|
force_pos--;
|
||||||
|
|
||||||
wsize = 1;
|
wsize = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue