From: Jianpeng Ma Date: Tue, 24 Oct 2017 14:07:18 +0000 (+0800) Subject: osd/PrimaryLogPG: add condition "is_chunky_scrub_active" to check object in chunky_scrub. X-Git-Tag: v13.0.1~426^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=6c81c9bb0979c101c112e8ccd45880e08bfdb945;p=ceph-ci.git osd/PrimaryLogPG: add condition "is_chunky_scrub_active" to check object in chunky_scrub. Avoid every time call scrubber.write_block_by_scrub. Most time scrubber is inactive. And compare to write_block_by_scrub, is_chunky_scrub_active is light. Signed-off-by: Jianpeng Ma --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 731f135fbb7..ca77a134332 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -2026,7 +2026,7 @@ void PrimaryLogPG::do_op(OpRequestRef& op) return; } - if (write_ordered && + if (write_ordered && scrubber.is_chunky_scrub_active() && scrubber.write_blocked_by_scrub(head)) { dout(20) << __func__ << ": waiting for scrub" << dendl; waiting_for_scrub.push_back(op);