From: Sage Weil Date: Mon, 9 Oct 2017 16:40:59 +0000 (-0500) Subject: osd/PrimaryLogPG: sync_complete for C_OSD_AppliedRecoveryObject[Replica] X-Git-Tag: v13.0.2~743^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6d7d8ba94b39f794b1385f50628d644a93ea427d;p=ceph.git osd/PrimaryLogPG: sync_complete for C_OSD_AppliedRecoveryObject[Replica] Signed-off-by: Sage Weil --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 44028fd3cf8..7e51570f2e2 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -226,8 +226,14 @@ class PrimaryLogPG::C_OSD_AppliedRecoveredObject : public Context { public: C_OSD_AppliedRecoveredObject(PrimaryLogPG *p, ObjectContextRef o) : pg(p), obc(o) {} + bool sync_finish(int r) override { + pg->_applied_recovered_object(obc); + return true; + } void finish(int r) override { + pg->lock(); pg->_applied_recovered_object(obc); + pg->unlock(); } }; @@ -250,8 +256,14 @@ class PrimaryLogPG::C_OSD_AppliedRecoveredObjectReplica : public Context { public: explicit C_OSD_AppliedRecoveredObjectReplica(PrimaryLogPG *p) : pg(p) {} + bool sync_finish(int r) override { + pg->_applied_recovered_object_replica(); + return true; + } void finish(int r) override { + pg->lock(); pg->_applied_recovered_object_replica(); + pg->unlock(); } }; @@ -10925,7 +10937,6 @@ void PrimaryLogPG::_committed_pushed_object( void PrimaryLogPG::_applied_recovered_object(ObjectContextRef obc) { - lock(); dout(20) << __func__ << dendl; if (obc) { dout(20) << "obc = " << *obc << dendl; @@ -10942,12 +10953,10 @@ void PrimaryLogPG::_applied_recovered_object(ObjectContextRef obc) requeue_scrub(false); } } - unlock(); } void PrimaryLogPG::_applied_recovered_object_replica() { - lock(); dout(20) << __func__ << dendl; assert(active_pushes >= 1); --active_pushes; @@ -10967,7 +10976,6 @@ void PrimaryLogPG::_applied_recovered_object_replica() get_osdmap()->get_epoch())); scrubber.active_rep_scrub.reset(); } - unlock(); } void PrimaryLogPG::recover_got(hobject_t oid, eversion_t v)