]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: make OpSequencer specific to ClientRequest.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 3 Aug 2021 13:24:26 +0000 (13:24 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Wed, 1 Sep 2021 13:07:18 +0000 (13:07 +0000)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/osd_operation_sequencer.h

index ee0760a300adbe6dea5b8ccc0803e0d730d18004..4a80a92307f5dd34ec315ae0d2fb6938fa1493bf 100644 (file)
@@ -6,7 +6,7 @@
 #include <map>
 #include <fmt/format.h>
 #include <seastar/core/condition-variable.hh>
-#include "crimson/common/operation.h"
+#include "crimson/osd/osd_operations/client_request.h"
 
 namespace crimson::osd {
 
@@ -26,12 +26,11 @@ namespace crimson::osd {
 // can keep an op waiting in the case explained above.
 class OpSequencer {
 public:
-  template <typename OpT,
-            typename HandleT,
+  template <typename HandleT,
             typename FuncT,
             typename Result = std::invoke_result_t<FuncT>>
   seastar::futurize_t<Result>
-  start_op(const OpT& op,
+  start_op(const ClientRequest& op,
            HandleT& handle,
            FuncT&& do_op) {
     const uint64_t prev_op = op.get_prev_id();
@@ -72,13 +71,11 @@ public:
   uint64_t get_last_issued() const {
     return last_issued;
   }
-  template <class OpT>
-  void finish_op(const OpT& op) {
+  void finish_op(const ClientRequest& op) {
     assert(op.get_id() > last_completed);
     last_completed = op.get_id();
   }
-  template <class OpT>
-  void maybe_reset(const OpT& op) {
+  void maybe_reset(const ClientRequest& op) {
     const auto op_id = op.get_id();
     // pg interval changes, so we need to reenqueue the previously unblocked
     // ops by rewinding the "last_unblock" pointer