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: v12.2.6~98^2~32 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5a77295c351d666295c2d6ee4eed910ee341ce22;p=ceph.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 (cherry picked from commit 6c81c9bb0979c101c112e8ccd45880e08bfdb945) --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index e70d5c453822..e81af6358aa9 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -2059,7 +2059,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);