From: Ronen Friedman Date: Mon, 28 Feb 2022 11:25:51 +0000 (+0000) Subject: osd/scrub: stop sending bogus digest-update events X-Git-Tag: v16.2.8~117^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F45194%2Fhead;p=ceph.git osd/scrub: stop sending bogus digest-update events A backport of a fix (PR #45068, commit e1b5347) made in Quincy. Direct cherry-picking failed, due to the major Scrub code refactoring in-between. Fixes: http://tracker.ceph.com/issues/54423 Manual backport of https://github.com/ceph/ceph/commit/e1b5347b81d17c8a5a1f6e1d4d76d18977ec2b0c Signed-off-by: Ronen Friedman --- diff --git a/src/osd/PrimaryLogScrub.cc b/src/osd/PrimaryLogScrub.cc index 1a14dbcd63f3..9244be253c2e 100644 --- a/src/osd/PrimaryLogScrub.cc +++ b/src/osd/PrimaryLogScrub.cc @@ -546,8 +546,8 @@ void PrimaryLogScrub::scrub_snapshot_metadata(ScrubMap& scrubmap, ++num_digest_updates_pending; ctx->register_on_success([this]() { - dout(20) << "updating scrub digest " << num_digest_updates_pending << dendl; - if (--num_digest_updates_pending <= 0) { + if ((num_digest_updates_pending >= 1) && + (--num_digest_updates_pending == 0)) { m_osds->queue_scrub_digest_update(m_pl_pg, m_pl_pg->is_scrub_blocking_ops()); } });