From: Radoslaw Zarzynski Date: Tue, 28 Apr 2020 14:45:52 +0000 (+0200) Subject: osd: refactor PeeringState::find_best_info() a little bit. X-Git-Tag: v16.1.0~1720^2~19 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=877dba6a4cb8b5e6488fd3b19cd4fd84e1c310b6;p=ceph.git osd: refactor PeeringState::find_best_info() a little bit. This is change is intended to only refactor the code. All it does is just declaring the `min_last_update_acceptable` closer to its usage. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/osd/PeeringState.cc b/src/osd/PeeringState.cc index ecf9c3c6368e..f783659d4390 100644 --- a/src/osd/PeeringState.cc +++ b/src/osd/PeeringState.cc @@ -1461,7 +1461,6 @@ map::const_iterator PeeringState::find_best_info( /* See doc/dev/osd_internals/last_epoch_started.rst before attempting * to make changes to this process. Also, make sure to update it * when you find bugs! */ - eversion_t min_last_update_acceptable = eversion_t::max(); epoch_t max_last_epoch_started_found = 0; for (auto i = infos.begin(); i != infos.end(); ++i) { if (!cct->_conf->osd_find_best_info_ignore_history_les && @@ -1475,6 +1474,7 @@ map::const_iterator PeeringState::find_best_info( max_last_epoch_started_found = i->second.last_epoch_started; } } + eversion_t min_last_update_acceptable = eversion_t::max(); for (auto i = infos.begin(); i != infos.end(); ++i) { if (max_last_epoch_started_found <= i->second.last_epoch_started) { if (min_last_update_acceptable > i->second.last_update)