summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-02-21 10:30:08 -0800
committerSage Weil <sage@inktank.com>2013-02-21 10:43:20 -0800
commit6d8dfb18feb4ce263453039fc0afdb1462279e9a (patch)
treefdc344cb15d17dcf4df12dfbecdb6d3197313837
parent0201cc80d4d205bb0fd2ee56633490d741ce0690 (diff)
downloadceph-6d8dfb18feb4ce263453039fc0afdb1462279e9a.tar.gz
osd: clear recovery state on pg removal
This ensures we release our in-progress recovery counters, which prevents recovery from getting blocked indefinitely when a pool removal races with recovery ops. Fixes: #4217 Backport: bobtail Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Samuel Just <sam.just@inktank.com>
-rw-r--r--src/osd/ReplicatedPG.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index d23db2884ed..becba7afab0 100644
--- a/src/osd/ReplicatedPG.cc
+++ b/src/osd/ReplicatedPG.cc
@@ -6247,6 +6247,10 @@ void ReplicatedPG::on_removal()
dout(10) << "on_removal" << dendl;
apply_and_flush_repops(false);
remove_watchers_and_notifies();
+
+ clear_primary_state();
+ osd->remove_want_pg_temp(info.pgid);
+ cancel_recovery();
}
void ReplicatedPG::on_shutdown()