diff options
author | Sage Weil <sage.weil@dreamhost.com> | 2012-04-27 22:09:00 -0700 |
---|---|---|
committer | Sage Weil <sage.weil@dreamhost.com> | 2012-04-28 07:46:42 -0700 |
commit | 0c65ac6f4e79ee014a61c706dae5e5225cca1d7f (patch) | |
tree | dea6f61ef4e27eda7169b71bf617d5b0d2eabefc | |
parent | 7e8ab0f29b580fe81588e0763d7ff6d4d3e0ddf9 (diff) | |
download | ceph-0c65ac6f4e79ee014a61c706dae5e5225cca1d7f.tar.gz |
osd: drop useless PG::fulfill_info()
There is a nice symmetry there with fulfill_log(), but it is a short
function with a single caller that mostly just forces us to copy a bunch
of data structures around unnecessarily. Drop it.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
-rw-r--r-- | src/osd/PG.cc | 20 | ||||
-rw-r--r-- | src/osd/PG.h | 2 |
2 files changed, 5 insertions, 17 deletions
diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 70818db7c82..ef3a005de19 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -3310,18 +3310,6 @@ void PG::share_pg_log() } } -void PG::fulfill_info(int from, const pg_query_t &query, - pair<pg_info_t, pg_interval_map_t> ¬ify_info) -{ - assert(!acting.empty()); - assert(from == acting[0]); - assert(query.type == pg_query_t::INFO); - - // info - dout(10) << "sending info" << dendl; - notify_info = make_pair(info, past_intervals); -} - void PG::fulfill_log(int from, const pg_query_t &query, epoch_t query_epoch) { assert(!acting.empty()); @@ -4334,9 +4322,11 @@ boost::statechart::result PG::RecoveryState::Stray::react(const MQuery& query) { PG *pg = context< RecoveryMachine >().pg; if (query.query.type == pg_query_t::INFO) { - pair<pg_info_t,pg_interval_map_t> notify_info; - pg->fulfill_info(query.from, query.query, notify_info); - context< RecoveryMachine >().send_notify(query.from, notify_info.first, notify_info.second); + dout(10) << "sending info to osd." << query.from << dendl; + assert(!pg->acting.empty()); + assert(query.from == pg->acting[0]); + assert(query.query.type == pg_query_t::INFO); + context< RecoveryMachine >().send_notify(query.from, pg->info, pg->past_intervals); } else { pg->fulfill_log(query.from, query.query, query.query_epoch); } diff --git a/src/osd/PG.h b/src/osd/PG.h index 07c92925c6e..46d988949c9 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -1331,8 +1331,6 @@ public: const vector<int>& newacting); void set_last_peering_reset(); - void fulfill_info(int from, const pg_query_t &query, - pair<pg_info_t, pg_interval_map_t> ¬ify_info); void fulfill_log(int from, const pg_query_t &query, epoch_t query_epoch); bool acting_up_affected(const vector<int>& newup, const vector<int>& newacting); bool old_peering_msg(epoch_t reply_epoch, epoch_t query_epoch); |