From 6d96104e55e67167f2fbeceba0e757063cc05c74 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 30 Nov 2010 16:50:41 -0800 Subject: [PATCH] osd: simplify scrub sanity checks Signed-off-by: Sage Weil --- src/osd/PG.cc | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 923fbad83ce3e..fbe0ab107daa1 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -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(); -- 2.39.5