From: Greg Farnum Date: Tue, 13 Apr 2021 05:27:32 +0000 (+0000) Subject: mon: add a set_recovery_stretch_mode function X-Git-Tag: v16.2.5~92^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3398e31e43cc59ee9e811af4b30f6c4f48f3db9f;p=ceph.git mon: add a set_recovery_stretch_mode function Signed-off-by: Greg Farnum (cherry picked from commit e1ae9257fbe6c79b757fe4446d9b9e4781045065) --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index f803d7a6c6f2..cbec370443a4 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -6677,8 +6677,14 @@ void Monitor::go_recovery_stretch_mode() if (!osdmon()->is_writeable()) { osdmon()->wait_for_writeable_ctx(new CMonGoRecovery(this)); } + set_recovery_stretch_mode(); + osdmon()->trigger_recovery_stretch_mode(); +} + +void Monitor::set_recovery_stretch_mode() +{ + degraded_stretch_mode = true; recovering_stretch_mode = true; - osdmon()->trigger_recovery_stretch_mode(); } void Monitor::maybe_go_degraded_stretch_mode() diff --git a/src/mon/Monitor.h b/src/mon/Monitor.h index 729c4f6cebdb..5a215545cbdc 100644 --- a/src/mon/Monitor.h +++ b/src/mon/Monitor.h @@ -272,6 +272,7 @@ public: const set& dead_buckets); void set_degraded_stretch_mode(); void go_recovery_stretch_mode(); + void set_recovery_stretch_mode(); void trigger_healthy_stretch_mode(); void set_healthy_stretch_mode(); void enable_stretch_mode();