summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Zafman <david.zafman@inktank.com>2013-04-26 13:31:48 -0700
committerDavid Zafman <david.zafman@inktank.com>2013-04-26 13:31:48 -0700
commite0c39c1e2139e380977247f1f577be971cc8b6eb (patch)
treec17383fe7a3445167dcac198ae55f70d81585fbd
parentebbdef29fa1d4e7f466ab3aa7197e851320fd6b4 (diff)
parente3b602adf7527101e4fd198263c8f7c1d4b5d194 (diff)
downloadceph-e0c39c1e2139e380977247f1f577be971cc8b6eb.tar.gz
Merge branch 'wip-4822' into next
Reviewed-by: Sam Just <sam.just@inktank.com>
-rw-r--r--src/osd/OSDMap.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/osd/OSDMap.cc b/src/osd/OSDMap.cc
index 28cc6a73f64..8e0474eb781 100644
--- a/src/osd/OSDMap.cc
+++ b/src/osd/OSDMap.cc
@@ -205,14 +205,8 @@ bool OSDMap::containing_subtree_is_down(CephContext *cct, int id, int subtree_ty
down_cache = &local_down_cache;
}
- if (!subtree_is_down(id, down_cache)) {
- ldout(cct, 30) << "containing_subtree_is_down(" << id << ") = false" << dendl;
- return false;
- }
-
int current = id;
while (true) {
- // invariant: current subtree is known to be down.
int type;
if (current >= 0) {
type = 0;
@@ -221,6 +215,11 @@ bool OSDMap::containing_subtree_is_down(CephContext *cct, int id, int subtree_ty
}
assert(type >= 0);
+ if (!subtree_is_down(current, down_cache)) {
+ ldout(cct, 30) << "containing_subtree_is_down(" << id << ") = false" << dendl;
+ return false;
+ }
+
// is this a big enough subtree to be done?
if (type >= subtree_type) {
ldout(cct, 30) << "containing_subtree_is_down(" << id << ") = true ... " << type << " >= " << subtree_type << dendl;