From: Samuel Just Date: Tue, 15 Apr 2014 21:17:33 +0000 (-0700) Subject: ReplicatedPG::recover_replicas: do not recover clones while snap obj is missing X-Git-Tag: v0.80-rc1~25^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1689%2Fhead;p=ceph.git ReplicatedPG::recover_replicas: do not recover clones while snap obj is missing Otherwise, we cannot safely read the snapset for the clone. Fixes: #8091 Signed-off-by: Samuel Just --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 558637037f9..a7710bfb9da 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -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;