diff options
author | Samuel Just <sam.just@inktank.com> | 2013-09-01 14:18:28 -0700 |
---|---|---|
committer | Samuel Just <sam.just@inktank.com> | 2013-09-14 00:45:32 -0700 |
commit | 05287db378a97721045d6092d025df266e44af1e (patch) | |
tree | b52d51dfa5a31c28b5084f3f62d96bd56310dd14 | |
parent | bf259aab24429c7a1634e630592166fb4f6b851c (diff) | |
download | ceph-05287db378a97721045d6092d025df266e44af1e.tar.gz |
ReplicatedPG/Backend: move over _failed_push
Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r-- | src/osd/ReplicatedBackend.h | 2 | ||||
-rw-r--r-- | src/osd/ReplicatedPG.cc | 11 | ||||
-rw-r--r-- | src/osd/ReplicatedPG.h | 1 |
3 files changed, 10 insertions, 4 deletions
diff --git a/src/osd/ReplicatedBackend.h b/src/osd/ReplicatedBackend.h index 3a98f50b4f2..0ee803d6afa 100644 --- a/src/osd/ReplicatedBackend.h +++ b/src/osd/ReplicatedBackend.h @@ -220,7 +220,7 @@ private: bufferlist data_received, interval_set<uint64_t> *intervals_usable, bufferlist *data_usable); - void _failed_push(int from, const hobject_t &soid) {} + void _failed_push(int from, const hobject_t &soid); void send_pushes(int prio, map<int, vector<PushOp> > &pushes) {} void prep_push_op_blank(const hobject_t& soid, PushOp *op) {} diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 6e75cdc4295..94573fd16e6 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -6788,8 +6788,9 @@ void ReplicatedBackend::sub_op_push(OpRequestRef op) return; } -void ReplicatedPG::_failed_push(int from, const hobject_t &soid) +void ReplicatedPG::failed_push(int from, const hobject_t &soid) { + // TODOSAM: this will need to update recovering map<hobject_t,set<int> >::iterator p = missing_loc.find(soid); if (p != missing_loc.end()) { dout(0) << "_failed_push " << soid << " from osd." << from @@ -6802,9 +6803,15 @@ void ReplicatedPG::_failed_push(int from, const hobject_t &soid) dout(0) << "_failed_push " << soid << " from osd." << from << " but not in missing_loc ???" << dendl; } - finish_recovery_op(soid); // close out this attempt, +} + +void ReplicatedBackend::_failed_push(int from, const hobject_t &soid) +{ + get_parent()->failed_push(from, soid); pull_from_peer[from].erase(soid); + if (pull_from_peer[from].empty()) + pull_from_peer.erase(from); pulling.erase(soid); } diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index 5c2c4fdf46b..704804e8744 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -834,7 +834,6 @@ protected: void _applied_recovered_object_replica(); void _committed_pushed_object(epoch_t epoch, eversion_t lc); void recover_got(hobject_t oid, eversion_t v); - void _failed_push(int from, const hobject_t &soid); // -- copyfrom -- map<hobject_t, CopyOpRef> copy_ops; |