From c4c647480adbd702296a632707c34b172121b9b0 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Mon, 14 Oct 2024 16:07:38 -0400 Subject: [PATCH] osdc: remove unused overloads for async::Completion ea67f3dee2a3f8fcdcbb0bc0e80e38ec70378f05 switched to asio::any_completion_handler<> for completions, but left some converting overloads behind for compatibility. none of those overloads appear to be used, so remove them Signed-off-by: Casey Bodley --- src/osdc/Objecter.h | 95 --------------------------------------------- 1 file changed, 95 deletions(-) diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h index 68bd76268ae..927c7e41329 100644 --- a/src/osdc/Objecter.h +++ b/src/osdc/Objecter.h @@ -48,7 +48,6 @@ #include "include/function2.hpp" #include "include/neorados/RADOS_Decodable.hpp" -#include "common/async/completion.h" #include "common/admin_socket.h" #include "common/ceph_time.h" #include "common/ceph_mutex.h" @@ -1968,30 +1967,6 @@ public: } } - boost::asio::any_completion_handler - OpCompletionVert(std::unique_ptr> c) { - if (c) - return [c = std::move(c)](boost::system::error_code ec) mutable { - c->dispatch(std::move(c), ec); - }; - else - return nullptr; - } - - template - boost::asio::any_completion_handler - OpCompletionVert(std::unique_ptr> c) { - if (c) { - return [c = std::move(c)](boost::system::error_code ec, T t) mutable { - c->dispatch(std::move(c), ec, std::move(t)); - }; - } else { - return nullptr; - } - } - struct Op : public RefCountedObject { OSDSession *session = nullptr; int incarnation = 0; @@ -3268,18 +3243,6 @@ public: return linger_watch(info, op, snapc, mtime, inbl, OpContextVert(onfinish, nullptr), objver); } - ceph_tid_t linger_watch(LingerOp *info, - ObjectOperation& op, - const SnapContext& snapc, ceph::real_time mtime, - ceph::buffer::list& inbl, - std::unique_ptr> onfinish, - version_t *objver) { - return linger_watch(info, op, snapc, mtime, inbl, - OpCompletionVert( - std::move(onfinish)), objver); - } ceph_tid_t linger_notify(LingerOp *info, ObjectOperation& op, snapid_t snap, ceph::buffer::list& inbl, @@ -3295,17 +3258,6 @@ public: OpContextVert(onack, poutbl), objver); } - ceph_tid_t linger_notify(LingerOp *info, - ObjectOperation& op, - snapid_t snap, ceph::buffer::list& inbl, - std::unique_ptr> onack, - version_t *objver) { - return linger_notify(info, op, snap, inbl, - OpCompletionVert( - std::move(onack)), objver); - } tl::expected linger_check(LingerOp *info); void linger_cancel(LingerOp *info); // releases a reference @@ -3886,12 +3838,6 @@ public: create_pool_snap(pool, snapName, OpContextVert(c, nullptr)); } - void create_pool_snap( - int64_t pool, std::string_view snapName, - std::unique_ptr> c) { - create_pool_snap(pool, snapName, - OpCompletionVert(std::move(c))); - } void allocate_selfmanaged_snap(int64_t pool, boost::asio::any_completion_handler< void(boost::system::error_code, @@ -3901,12 +3847,6 @@ public: allocate_selfmanaged_snap(pool, OpContextVert(c, psnapid)); } - void allocate_selfmanaged_snap(int64_t pool, - std::unique_ptr> c) { - allocate_selfmanaged_snap(pool, - OpCompletionVert(std::move(c))); - } void delete_pool_snap(int64_t pool, std::string_view snapName, decltype(PoolOp::onfinish)&& onfinish); void delete_pool_snap(int64_t pool, std::string_view snapName, @@ -3914,12 +3854,6 @@ public: delete_pool_snap(pool, snapName, OpContextVert(c, nullptr)); } - void delete_pool_snap(int64_t pool, std::string_view snapName, - std::unique_ptr> c) { - delete_pool_snap(pool, snapName, - OpCompletionVert(std::move(c))); - } void delete_selfmanaged_snap(int64_t pool, snapid_t snap, decltype(PoolOp::onfinish)&& onfinish); @@ -3928,12 +3862,6 @@ public: delete_selfmanaged_snap(pool, snap, OpContextVert(c, nullptr)); } - void delete_selfmanaged_snap(int64_t pool, snapid_t snap, - std::unique_ptr> c) { - delete_selfmanaged_snap(pool, snap, - OpCompletionVert(std::move(c))); - } void create_pool(std::string_view name, @@ -3945,25 +3873,12 @@ public: OpContextVert(onfinish, nullptr), crush_rule); } - void create_pool(std::string_view name, - std::unique_ptr> c, - int crush_rule=-1) { - create_pool(name, - OpCompletionVert(std::move(c)), - crush_rule); - } void delete_pool(int64_t pool, decltype(PoolOp::onfinish)&& onfinish); void delete_pool(int64_t pool, Context* onfinish) { delete_pool(pool, OpContextVert(onfinish, nullptr)); } - void delete_pool(int64_t pool, - std::unique_ptr> c) { - delete_pool(pool, OpCompletionVert(std::move(c))); - } void delete_pool(std::string_view name, decltype(PoolOp::onfinish)&& onfinish); @@ -3972,11 +3887,6 @@ public: Context* onfinish) { delete_pool(name, OpContextVert(onfinish, nullptr)); } - void delete_pool(std::string_view name, - std::unique_ptr> c) { - delete_pool(name, OpCompletionVert(std::move(c))); - } void handle_pool_op_reply(MPoolOpReply *m); int pool_op_cancel(ceph_tid_t tid, int r); @@ -4026,11 +3936,6 @@ public: Context *onfinish) { get_fs_stats_(poolid, OpContextVert(onfinish, result)); } - void get_fs_stats(std::optional poolid, - std::unique_ptr> c) { - get_fs_stats_(poolid, OpCompletionVert(std::move(c))); - } int statfs_op_cancel(ceph_tid_t tid, int r); void _finish_statfs_op(StatfsOp *op, int r); -- 2.39.5