]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: rename execute_{osd,pg}_op() in OpsExecuters. 36520/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Sun, 9 Aug 2020 22:46:25 +0000 (00:46 +0200)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Sun, 9 Aug 2020 23:09:12 +0000 (01:09 +0200)
The reason for renaming is the duplicating the information
already present in the classes' names.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/objclass.cc
src/crimson/osd/ops_executer.cc
src/crimson/osd/ops_executer.h
src/crimson/osd/pg.cc

index 1aff34a59da9593229ff9a23ae13539308b17d28..0017a21b02aa753b4d86ee56a521540d398ba613 100644 (file)
@@ -25,7 +25,7 @@ static inline int execute_osd_op(cls_method_context_t hctx, OSDOp& op)
   // created for us by `seastar::async` in `::do_op_call()`.
   int ret = 0;
   using osd_op_errorator = crimson::osd::OpsExecuter::osd_op_errorator;
-  reinterpret_cast<crimson::osd::OpsExecuter*>(hctx)->execute_osd_op(op).handle_error(
+  reinterpret_cast<crimson::osd::OpsExecuter*>(hctx)->execute_op(op).handle_error(
     osd_op_errorator::all_same_way([&ret] (const std::error_code& err) {
       assert(err.value() > 0);
       ret = -err.value();
index 055dee60625fd31ec927ca6c2da02cde856554aa..5ad56d0c4a14149e449ec41627744565f44b267d 100644 (file)
@@ -421,7 +421,7 @@ OpsExecuter::watch_errorator::future<> OpsExecuter::do_op_notify_ack(
 }
 
 OpsExecuter::osd_op_errorator::future<>
-OpsExecuter::execute_osd_op(OSDOp& osd_op)
+OpsExecuter::execute_op(OSDOp& osd_op)
 {
   // TODO: dispatch via call table?
   // TODO: we might want to find a way to unify both input and output
@@ -947,7 +947,7 @@ static seastar::future<> do_pgls_filtered(
 }
 
 seastar::future<>
-PgOpsExecuter::execute_pg_op(OSDOp& osd_op)
+PgOpsExecuter::execute_op(OSDOp& osd_op)
 {
   logger().warn("handling op {}", ceph_osd_op_name(osd_op.op.op));
   switch (const ceph_osd_op& op = osd_op.op; op.op) {
index 35cd007903f65708825893d6f212dec35b896524..0efe6b43c7a757e717be52d6384fa7d6cdcea6fd 100644 (file)
@@ -174,7 +174,7 @@ public:
       msg(std::move(msg)) {
   }
 
-  osd_op_errorator::future<> execute_osd_op(class OSDOp& osd_op);
+  osd_op_errorator::future<> execute_op(class OSDOp& osd_op);
 
   template <typename Func, typename MutFunc>
   osd_op_errorator::future<> flush_changes(Func&& func, MutFunc&& mut_func) &&;
@@ -273,7 +273,7 @@ public:
     : pg(pg), nspace(msg.get_hobj().nspace) {
   }
 
-  seastar::future<> execute_pg_op(class OSDOp& osd_op);
+  seastar::future<> execute_op(class OSDOp& osd_op);
 
 private:
   const PG& pg;
index 3e93ac42e4d5b7820b41e9ace408c44e0f1e3518..f05d36acd68f9207215f08c747c362fa56e51319 100644 (file)
@@ -600,7 +600,7 @@ seastar::future<Ref<MOSDOpReply>> PG::do_osd_ops(
       *m,
       obc->obs.oi.soid,
       ceph_osd_op_name(osd_op.op.op));
-    return ox->execute_osd_op(osd_op);
+    return ox->execute_op(osd_op);
   }).safe_then([this, obc, m, ox = ox.get(), &op_info] {
     logger().debug(
       "do_osd_ops: {} - object {} all operations successful",
@@ -680,7 +680,7 @@ seastar::future<Ref<MOSDOpReply>> PG::do_pg_ops(Ref<MOSDOp> m)
                                             std::as_const(*m));
   return seastar::do_for_each(m->ops, [ox = ox.get()](OSDOp& osd_op) {
     logger().debug("will be handling pg op {}", ceph_osd_op_name(osd_op.op.op));
-    return ox->execute_pg_op(osd_op);
+    return ox->execute_op(osd_op);
   }).then([m, this, ox = std::move(ox)] {
     auto reply = make_message<MOSDOpReply>(m.get(), 0, get_osdmap_epoch(),
                                            CEPH_OSD_FLAG_ACK | CEPH_OSD_FLAG_ONDISK,