From 7e697b1bc2ffac086b6a24f97aba755401cd8c37 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Tue, 15 Apr 2014 14:17:33 -0700 Subject: [PATCH] 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 --- src/osd/ReplicatedPG.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 558637037f951..a7710bfb9dafb 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; -- 2.39.5