Skip to content

Commit

Permalink
osd: Don't evict after a flush if intersecting scrub range
Browse files Browse the repository at this point in the history
Fixes: http://tracker.ceph.com/issues/38840

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 459cbb5)
  • Loading branch information
dzafman authored and Prashant D committed May 22, 2019
1 parent 1dc43a0 commit a16fd63
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/osd/PrimaryLogPG.cc
Expand Up @@ -14243,6 +14243,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;
Expand Down

0 comments on commit a16fd63

Please sign in to comment.