From: Samuel Just Date: Fri, 30 Nov 2012 22:04:53 +0000 (-0800) Subject: ReplicatedPG: only increment active_scrub on primary for final push X-Git-Tag: v0.55~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=49f32cee647c5bd09f36ba7c9fd4f481a697b9d7;p=ceph.git ReplicatedPG: only increment active_scrub on primary for final push We only queue the _applied_recovered_object callback on the primary for the final push. It is this callback which decrements active_pushes. It's ok to not increment active_pushes for the intermediate pushes since these only affact a temp file. Signed-off-by: Samuel Just --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 388751e8e8bf..e66c77e2f787 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -5326,6 +5326,9 @@ void ReplicatedPG::handle_pull_response(OpRequestRef op) obc->ondisk_write_lock(); + // keep track of active pushes for scrub + ++active_pushes; + onreadable = new C_OSD_AppliedRecoveredObject(this, t, obc); onreadable_sync = new C_OSD_OndiskWriteUnlock(obc); } else { @@ -5376,6 +5379,10 @@ void ReplicatedPG::handle_push(OpRequestRef op) bool complete = m->recovery_progress.data_complete && m->recovery_progress.omap_complete; ObjectStore::Transaction *t = new ObjectStore::Transaction; + + // keep track of active pushes for scrub + ++active_pushes; + Context *onreadable = new C_OSD_AppliedRecoveredObjectReplica(this, t); Context *onreadable_sync = 0; submit_push_data(m->recovery_info, @@ -5811,9 +5818,6 @@ void ReplicatedPG::sub_op_push(OpRequestRef op) { op->mark_started(); - // keep track of active pushes for scrub - ++active_pushes; - if (is_primary()) { handle_pull_response(op); } else {