From: Sage Weil Date: Thu, 23 Oct 2014 23:53:14 +0000 (-0700) Subject: osd/ReplicatdPG: adjust braces (no semantic change) X-Git-Tag: v0.92~33^2~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2a67b0a0900bfb629f7ea6d5c34e3ae0eda88ff6;p=ceph.git osd/ReplicatdPG: adjust braces (no semantic change) Signed-off-by: Sage Weil --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 475555322d0a..1c60a059e017 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -1795,40 +1795,40 @@ bool ReplicatedPG::maybe_handle_cache(OpRequestRef op, } if (op->may_write() || write_ordered || !hit_set) { promote_object(obc, missing_oid, oloc, op); - } else { - switch (pool.info.min_read_recency_for_promote) { - case 0: - promote_object(obc, missing_oid, oloc, op); - break; - case 1: - // Check if in the current hit set - if (in_hit_set) { - promote_object(obc, missing_oid, oloc, op); - } else { - do_cache_redirect(op, obc); - } - break; - default: - if (in_hit_set) { - promote_object(obc, missing_oid, oloc, op); - } else { - // Check if in other hit sets - map::iterator itor; - bool in_other_hit_sets = false; - for (itor = agent_state->hit_set_map.begin(); itor != agent_state->hit_set_map.end(); ++itor) { - if (itor->second->contains(missing_oid)) { - in_other_hit_sets = true; - break; - } - } - if (in_other_hit_sets) { - promote_object(obc, missing_oid, oloc, op); - } else { - do_cache_redirect(op, obc); - } - } - break; + return true; + } + switch (pool.info.min_read_recency_for_promote) { + case 0: + promote_object(obc, missing_oid, oloc, op); + break; + case 1: + // Check if in the current hit set + if (in_hit_set) { + promote_object(obc, missing_oid, oloc, op); + } else { + do_cache_redirect(op, obc); } + break; + default: + if (in_hit_set) { + promote_object(obc, missing_oid, oloc, op); + } else { + // Check if in other hit sets + map::iterator itor; + bool in_other_hit_sets = false; + for (itor = agent_state->hit_set_map.begin(); itor != agent_state->hit_set_map.end(); ++itor) { + if (itor->second->contains(missing_oid)) { + in_other_hit_sets = true; + break; + } + } + if (in_other_hit_sets) { + promote_object(obc, missing_oid, oloc, op); + } else { + do_cache_redirect(op, obc); + } + } + break; } return true;