projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d8eb7a
)
crush: fix force for non-root TAKE
author
Sage Weil
<sage@newdream.net>
Mon, 12 Dec 2011 17:35:22 +0000
(09:35 -0800)
committer
Sage Weil
<sage@newdream.net>
Tue, 10 Jan 2012 16:56:57 +0000
(08:56 -0800)
Signed-off-by: Sage Weil <sage@newdream.net>
net/ceph/crush/mapper.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ceph/crush/mapper.c
b/net/ceph/crush/mapper.c
index 3a94eae7abe924d8d73d454b5a9330ab50bda968..b79747c4b64584cf9674920640ff0cf355efa45b 100644
(file)
--- a/
net/ceph/crush/mapper.c
+++ b/
net/ceph/crush/mapper.c
@@
-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;