From f6d3077225cef1c0b0847ebb040966d01ac8bc2e Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 18 Sep 2017 14:51:36 -0500 Subject: [PATCH] osd: drop redundant is_active() check before scrub_sched() Signed-off-by: Sage Weil --- src/osd/OSD.cc | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index d59d5922165..207311bae08 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -6889,15 +6889,13 @@ void OSD::sched_scrub() PG *pg = _lookup_lock_pg(scrub.pgid); if (!pg) continue; - if (pg->is_active()) { - dout(10) << "sched_scrub scrubbing " << scrub.pgid << " at " << scrub.sched_time - << (pg->get_must_scrub() ? ", explicitly requested" : - (load_is_low ? ", load_is_low" : " deadline < now")) - << dendl; - if (pg->sched_scrub()) { - pg->unlock(); - break; - } + dout(10) << "sched_scrub scrubbing " << scrub.pgid << " at " << scrub.sched_time + << (pg->get_must_scrub() ? ", explicitly requested" : + (load_is_low ? ", load_is_low" : " deadline < now")) + << dendl; + if (pg->sched_scrub()) { + pg->unlock(); + break; } pg->unlock(); } while (service.next_scrub_stamp(scrub, &scrub)); -- 2.39.5