]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG::recover_replicas: do not recover clones while snap obj is missing 1689/head
authorSamuel Just <sam.just@inktank.com>
Tue, 15 Apr 2014 21:17:33 +0000 (14:17 -0700)
committerSamuel Just <sam.just@inktank.com>
Thu, 17 Apr 2014 21:46:34 +0000 (14:46 -0700)
Otherwise, we cannot safely read the snapset for the clone.

Fixes: #8091
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/ReplicatedPG.cc

index 558637037f951707de14230f303cb3e45cb40e41..a7710bfb9dafbe06c294ea5a2ff6168fbd9b5b08 100644 (file)
@@ -9742,6 +9742,18 @@ int ReplicatedPG::recover_replicas(int max, ThreadPool::TPHandle &handle)
        continue;
       }
 
+      if (soid.is_snap() && pg_log.get_missing().is_missing(soid.get_head())) {
+       dout(10) << __func__ << ": " << soid.get_head()
+                << " still missing on primary" << dendl;
+       continue;
+      }
+
+      if (soid.is_snap() && pg_log.get_missing().is_missing(soid.get_snapdir())) {
+       dout(10) << __func__ << ": " << soid.get_snapdir()
+                << " still missing on primary" << dendl;
+       continue;
+      }
+
       if (pg_log.get_missing().is_missing(soid)) {
        dout(10) << __func__ << ": " << soid << " still missing on primary" << dendl;
        continue;