]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PrimaryLogPG: restore op_applied in PGBackend
authorSage Weil <sage@redhat.com>
Fri, 16 Mar 2018 19:57:27 +0000 (14:57 -0500)
committerSage Weil <sage@redhat.com>
Fri, 16 Mar 2018 22:20:29 +0000 (17:20 -0500)
Call it when we queue the submitted write.  For ReplicatedPG this is
inside submit_transaction(), and for ECBackend it's when we finally
submit the write for disk (possibly delayed by a read/modify/write).

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/ECBackend.cc
src/osd/PGBackend.h
src/osd/PrimaryLogPG.cc
src/osd/PrimaryLogPG.h
src/osd/ReplicatedBackend.cc

index 3256d7b979d366f443f85f5d86bcda3b6cab63a3..874727f1cf197881c8fac76683a44bc961e55f90 100644 (file)
@@ -929,6 +929,7 @@ void ECBackend::handle_sub_write(
   tls.push_back(std::move(op.t));
   tls.push_back(std::move(localt));
   get_parent()->queue_transactions(tls, msg);
+  get_parent()->op_applied(op.at_version);
 }
 
 void ECBackend::handle_sub_read(
index 68da2e89b6fd0c0389a0e1b92bd46b16e4e0805e..c2967441b93669339ce6a5c88d53d9214cb0d10a 100644 (file)
@@ -216,6 +216,9 @@ typedef ceph::shared_ptr<const OSDMap> OSDMapRef;
 
      virtual void release_locks(ObcLockManager &manager) = 0;
 
+     virtual void op_applied(
+       const eversion_t &applied_version) = 0;
+
      virtual bool should_send_op(
        pg_shard_t peer,
        const hobject_t &hoid) = 0;
index b5ac56aa28f6ee09d61c2fe522631af18d544701..b9f41c71bf911c1acaf9de4e039e70aa5df6e724 100644 (file)
@@ -10040,7 +10040,6 @@ void PrimaryLogPG::issue_repop(RepGather *repop, OpContext *ctx)
     repop->rep_tid,
     ctx->reqid,
     ctx->op);
-  op_applied(ctx->at_version);
 }
 
 PrimaryLogPG::RepGather *PrimaryLogPG::new_repop(
index d46af22543c6709d69ba86f5dfa87a93f1a3dc5c..dfa584b1ea39602a1755fc8026f9b51b2bd33fa4 100644 (file)
@@ -414,7 +414,7 @@ public:
     append_log(logv, trim_to, roll_forward_to, t, transaction_applied);
   }
 
-  void op_applied(const eversion_t &applied_version);  // remove me
+  void op_applied(const eversion_t &applied_version) override;
 
   bool should_send_op(
     pg_shard_t peer,
index e786c5003313c7c79e4b18b9b6b7e5c21a873036..f1e333bb0839e08ea458dca18183eb49001d7ccf 100644 (file)
@@ -498,6 +498,7 @@ void ReplicatedBackend::submit_transaction(
   tls.push_back(std::move(op_t));
 
   parent->queue_transactions(tls, op.op);
+  parent->op_applied(at_version);
 }
 
 void ReplicatedBackend::op_commit(