diff options
author | Sage Weil <sage@inktank.com> | 2013-06-04 22:38:29 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-06-04 22:43:04 -0700 |
commit | c64b8df7c653262834ff1d292501d94cb036f40e (patch) | |
tree | 79e69f899eb166ee21d2a2ee325f65b7fbb293f5 | |
parent | 8c23d8cb46d432ca3c840336e02a9eed868d78f3 (diff) | |
download | ceph-c64b8df7c653262834ff1d292501d94cb036f40e.tar.gz |
osd: call submit_push_complete from submit_push_data
Every call to submit_push_data is followed by an
if (complete)
submit_push_complete(...)
So, call it directly and pass in the complete flag.
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | src/osd/ReplicatedPG.cc | 13 | ||||
-rw-r--r-- | src/osd/ReplicatedPG.h | 3 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 91241fa26cb..49421e41683 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -5263,8 +5263,9 @@ int ReplicatedPG::send_pull(int prio, int peer, } void ReplicatedPG::submit_push_data( - const ObjectRecoveryInfo &recovery_info, + ObjectRecoveryInfo &recovery_info, bool first, + bool complete, const interval_set<uint64_t> &intervals_included, bufferlist data_included, bufferlist omap_header, @@ -5294,6 +5295,9 @@ void ReplicatedPG::submit_push_data( omap_entries); t->setattrs(get_temp_coll(t), recovery_info.soid, attrs); + + if (complete) + submit_push_complete(recovery_info, t); } void ReplicatedPG::submit_push_complete(ObjectRecoveryInfo &recovery_info, @@ -5448,7 +5452,7 @@ void ReplicatedPG::handle_pull_response(OpRequestRef op) Context *onreadable = 0; Context *onreadable_sync = 0; Context *oncomplete = 0; - submit_push_data(pi.recovery_info, first, + submit_push_data(pi.recovery_info, first, complete, data_included, data, m->omap_header, m->attrset, @@ -5458,7 +5462,6 @@ void ReplicatedPG::handle_pull_response(OpRequestRef op) info.stats.stats.sum.num_keys_recovered += m->omap_entries.size(); if (complete) { - submit_push_complete(pi.recovery_info, t); info.stats.stats.sum.num_objects_recovered++; SnapSetContext *ssc; @@ -5546,15 +5549,13 @@ void ReplicatedPG::handle_push(OpRequestRef op) Context *onreadable_sync = 0; submit_push_data(m->recovery_info, first, + complete, m->data_included, data, m->omap_header, m->attrset, m->omap_entries, t); - if (complete) - submit_push_complete(m->recovery_info, - t); int r = osd->store-> queue_transaction( diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index dcfecd3e61a..e9f5e310b1f 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -560,8 +560,9 @@ protected: int send_pull(int priority, int peer, const ObjectRecoveryInfo& recovery_info, ObjectRecoveryProgress progress); - void submit_push_data(const ObjectRecoveryInfo &recovery_info, + void submit_push_data(ObjectRecoveryInfo &recovery_info, bool first, + bool complete, const interval_set<uint64_t> &intervals_included, bufferlist data_included, bufferlist omap_header, |