]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: If ending on a head object get all of meta map 21546/head
authorDavid Zafman <dzafman@redhat.com>
Sat, 28 Apr 2018 22:44:06 +0000 (15:44 -0700)
committerDavid Zafman <dzafman@redhat.com>
Sat, 28 Apr 2018 23:42:19 +0000 (16:42 -0700)
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>
src/osd/PG.h

index 9e6fe7cb5f7bb07b26c0eb55035fa375cff9a2e0..06a500185664b134835fa341bcb10528ed83ec9f 100644 (file)
@@ -1601,11 +1601,15 @@ public:
         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);