From: David Zafman Date: Tue, 26 Mar 2019 22:53:10 +0000 (-0700) Subject: osd: Don't evict after a flush if intersecting scrub range X-Git-Tag: v13.2.7~302^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=db26096c1215f1b85d2cc58ff98f6a59a982bfc7;p=ceph.git osd: Don't evict after a flush if intersecting scrub range Fixes: http://tracker.ceph.com/issues/38840 Signed-off-by: David Zafman (cherry picked from commit 459cbb5a6ca3b521b20f36f328f25f398d0ef1c4) --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 7eb43c28913..bffe72ccaa0 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -14065,6 +14065,11 @@ bool PrimaryLogPG::agent_maybe_evict(ObjectContextRef& obc, bool after_flush) dout(20) << __func__ << " skip (dirty) " << obc->obs.oi << dendl; return false; } + // This is already checked by agent_work() which passes after_flush = false + if (after_flush && range_intersects_scrub(soid, soid.get_head())) { + dout(20) << __func__ << " skip (scrubbing) " << obc->obs.oi << dendl; + return false; + } if (!obc->obs.oi.watchers.empty()) { dout(20) << __func__ << " skip (watchers) " << obc->obs.oi << dendl; return false;