]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: simplify scrub sanity checks
authorSage Weil <sage@newdream.net>
Wed, 1 Dec 2010 00:50:41 +0000 (16:50 -0800)
committerSage Weil <sage@newdream.net>
Wed, 1 Dec 2010 00:50:41 +0000 (16:50 -0800)
Signed-off-by: Sage Weil <sage@newdream.net>
src/osd/PG.cc

index 923fbad83ce3eedf33c25e0b4a6057b663d927e5..fbe0ab107daa1df70b08195d6fba666e262560c7 100644 (file)
@@ -3074,16 +3074,8 @@ void PG::scrub()
  
   epoch_t epoch = info.history.same_acting_since;
 
-  if (!is_primary()) {
-    dout(10) << "scrub -- not primary" << dendl;
-    clear_scrub_reserved();
-    unlock();
-    osd->map_lock.put_read();
-    return;
-  }
-
-  if (!is_active() || !is_clean()) {
-    dout(10) << "scrub -- not active or not clean" << dendl;
+  if (!is_primary() || !is_active() || !is_clean()) {
+    dout(10) << "scrub -- not primary or active or not clean" << dendl;
     clear_scrub_reserved();
     unlock();
     osd->map_lock.put_read();