From: Samuel Just Date: Tue, 24 Sep 2013 23:23:39 +0000 (-0700) Subject: ReplicatedBackend::handle_pull_response: use list X-Git-Tag: v0.71~68^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b29ac2ad87a7b1983a491903540d1c19b852a0af;p=ceph.git ReplicatedBackend::handle_pull_response: use list Signed-off-by: Samuel Just --- diff --git a/src/osd/ReplicatedBackend.h b/src/osd/ReplicatedBackend.h index af8b3e291b60..e34e55a618e1 100644 --- a/src/osd/ReplicatedBackend.h +++ b/src/osd/ReplicatedBackend.h @@ -230,7 +230,7 @@ private: void handle_pull(int peer, PullOp &op, PushOp *reply); bool handle_pull_response( int from, PushOp &op, PullOp *response, - list > *to_continue, + list *to_continue, ObjectStore::Transaction *t); void handle_push(int from, PushOp &op, PushReplyOp *response, ObjectStore::Transaction *t); diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index f1155a0f897e..fe22b22e2cbb 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -1603,20 +1603,20 @@ void ReplicatedBackend::_do_push(OpRequestRef op) struct C_ReplicatedBackend_OnPullComplete : GenContext { ReplicatedBackend *bc; - list > to_continue; + list to_continue; int priority; C_ReplicatedBackend_OnPullComplete(ReplicatedBackend *bc, int priority) : bc(bc), priority(priority) {} void finish(ThreadPool::TPHandle &handle) { ReplicatedBackend::RPGHandle *h = bc->_open_recovery_op(); - for (list >::iterator i = + for (list::iterator i = to_continue.begin(); i != to_continue.end(); ++i) { - if (!bc->start_pushes(i->first, i->second, h)) { + if (!bc->start_pushes((*i)->obs.oi.soid, *i, h)) { bc->get_parent()->on_global_recover( - i->first); + (*i)->obs.oi.soid); } handle.reset_tp_timeout(); } @@ -1632,7 +1632,7 @@ void ReplicatedBackend::_do_pull_response(OpRequestRef op) vector replies(1); ObjectStore::Transaction *t = new ObjectStore::Transaction; - list > to_continue; + list to_continue; for (vector::iterator i = m->pushes.begin(); i != m->pushes.end(); ++i) { @@ -6311,7 +6311,7 @@ ObjectRecoveryInfo ReplicatedBackend::recalc_subsets( bool ReplicatedBackend::handle_pull_response( int from, PushOp &pop, PullOp *response, - list > *to_continue, + list *to_continue, ObjectStore::Transaction *t ) { @@ -6385,7 +6385,7 @@ bool ReplicatedBackend::handle_pull_response( pi.stat.num_keys_recovered += pop.omap_entries.size(); if (complete) { - to_continue->push_back(make_pair(hoid, pi.obc)); + to_continue->push_back(pi.obc); pi.stat.num_objects_recovered++; get_parent()->on_local_recover( hoid, pi.stat, pi.recovery_info, pi.obc, t); @@ -6978,7 +6978,7 @@ void ReplicatedBackend::sub_op_push(OpRequestRef op) if (is_primary()) { PullOp resp; RPGHandle *h = _open_recovery_op(); - list > to_continue; + list to_continue; bool more = handle_pull_response( m->get_source().num(), pop, &resp, &to_continue, t);