]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/PrimaryLogPG: defer evict if head *or* object intersect scrub interval 21628/head
authorSage Weil <sage@redhat.com>
Tue, 24 Apr 2018 20:35:28 +0000 (15:35 -0500)
committerSage Weil <sage@redhat.com>
Tue, 24 Apr 2018 21:04:27 +0000 (16:04 -0500)
commitc20a95b0b9f4082dcebb339135683b91fe39ec0a
treec5e35e990f7dceeaca42c7bec784be784adefad1
parent710b3160b13cb0db2595a870c9bb233b72465a03
osd/PrimaryLogPG: defer evict if head *or* object intersect scrub interval

Consider a scenario like:
- scrub [3:2525d100:::earlier:head,3:2525d12f:::foo:200]
 - we see 3:2525d12f:::foo:100 and include it in scrub map
- scrub [3:2525d12f:::foo:200, 3:2525dfff:::later:head]
- some op(s) that cause scrub to be preempted
- agent_work wants to evict 3:2525d12f:::foo:100
  - write_blocked_by_scrub sees scrub is preempted, returns false
  - 3:2525d12f:::foo:100 is removed, :head SnapSet is updated
- scrub rescrubs [3:2525d12f:::foo:200, 3:2525dfff:::later:head]
  - includes (updated) :head SnapSet
  - issues error like "3:2525d12f:::foo:100 is an unexpected clone"

Fix the problem by checking if anything part of the object-to-evict and
its head touch the scrub range; if so, back off.  Do not let eviction
preempt scrub; we can come back and do it later.

Fixes: http://tracker.ceph.com/issues/23646
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc
src/osd/PG.h
src/osd/PrimaryLogPG.cc