]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatdPG: adjust braces (no semantic change)
authorSage Weil <sage@redhat.com>
Thu, 23 Oct 2014 23:53:14 +0000 (16:53 -0700)
committerSage Weil <sage@redhat.com>
Sun, 11 Jan 2015 04:35:03 +0000 (20:35 -0800)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/ReplicatedPG.cc

index 475555322d0a8ef15b6ea2d73bbf8ab302636ca1..1c60a059e017f75eb8493a13ade06d52a8e4d7f2 100644 (file)
@@ -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<time_t,HitSetRef>::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<time_t,HitSetRef>::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;