From: Radoslaw Zarzynski Date: Sun, 9 Aug 2020 22:46:25 +0000 (+0200) Subject: crimson/osd: rename execute_{osd,pg}_op() in OpsExecuters. X-Git-Tag: v16.1.0~1483^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7e6221fecdea39dba150ef0901495ea48a50ee4c;p=ceph.git crimson/osd: rename execute_{osd,pg}_op() in OpsExecuters. The reason for renaming is the duplicating the information already present in the classes' names. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/crimson/osd/objclass.cc b/src/crimson/osd/objclass.cc index 1aff34a59da9..0017a21b02aa 100644 --- a/src/crimson/osd/objclass.cc +++ b/src/crimson/osd/objclass.cc @@ -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(hctx)->execute_osd_op(op).handle_error( + reinterpret_cast(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(); diff --git a/src/crimson/osd/ops_executer.cc b/src/crimson/osd/ops_executer.cc index 055dee60625f..5ad56d0c4a14 100644 --- a/src/crimson/osd/ops_executer.cc +++ b/src/crimson/osd/ops_executer.cc @@ -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) { diff --git a/src/crimson/osd/ops_executer.h b/src/crimson/osd/ops_executer.h index 35cd007903f6..0efe6b43c7a7 100644 --- a/src/crimson/osd/ops_executer.h +++ b/src/crimson/osd/ops_executer.h @@ -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 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; diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 3e93ac42e4d5..f05d36acd68f 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -600,7 +600,7 @@ seastar::future> 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> PG::do_pg_ops(Ref 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(m.get(), 0, get_osdmap_epoch(), CEPH_OSD_FLAG_ACK | CEPH_OSD_FLAG_ONDISK,