Skip to content

Commit

Permalink
osd: If ending on a head object get all of meta map
Browse files Browse the repository at this point in the history
When ending on a head object, the head and snapshots would stay in
cleaned_meta_map until more maps arrive.  The problem as that
during a scrub an eviction could occur because scrubber.start
is already past the stray object(s) so range_intersects_scrub() is false.

Fixes: http://tracker.ceph.com/issues/23909

Signed-off-by: David Zafman <dzafman@redhat.com>
  • Loading branch information
dzafman committed Apr 28, 2018
1 parent 1a7fa9a commit 83861a5
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/osd/PG.h
Original file line number Diff line number Diff line change
Expand Up @@ -1601,11 +1601,15 @@ class PG : public DoutPrefixProvider {
auto iter = cleaned_meta_map.objects.end();
--iter; // not empty, see if clause
auto begin = cleaned_meta_map.objects.begin();
while (iter != begin) {
auto next = iter--;
if (next->first.get_head() != iter->first.get_head()) {
++iter;
break;
if (iter->first.has_snapset()) {
++iter;
} else {
while (iter != begin) {
auto next = iter--;
if (next->first.get_head() != iter->first.get_head()) {
++iter;
break;
}
}
}
for_meta_scrub.objects.insert(begin, iter);
Expand Down

0 comments on commit 83861a5

Please sign in to comment.