]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osdc: remove unused overloads for async::Completion
authorCasey Bodley <cbodley@redhat.com>
Mon, 14 Oct 2024 20:07:38 +0000 (16:07 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 14 Oct 2024 20:13:19 +0000 (16:13 -0400)
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 <cbodley@redhat.com>
src/osdc/Objecter.h

index 68bd76268ae94fd9819c016ba54725e1522a6cc6..927c7e413296ffc9bef72900c7bfffb2fb253397 100644 (file)
@@ -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<void(boost::system::error_code)>
-  OpCompletionVert(std::unique_ptr<ceph::async::Completion<
-                    void(boost::system::error_code)>> c) {
-    if (c)
-      return [c = std::move(c)](boost::system::error_code ec) mutable {
-       c->dispatch(std::move(c), ec);
-      };
-    else
-      return nullptr;
-  }
-
-  template<typename T>
-  boost::asio::any_completion_handler<void(boost::system::error_code, T)>
-  OpCompletionVert(std::unique_ptr<ceph::async::Completion<
-                    void(boost::system::error_code, T)>> 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<ceph::buffer::list>(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<ceph::async::Completion<
-                           void(boost::system::error_code,
-                                ceph::buffer::list)>> onfinish,
-                         version_t *objver) {
-    return linger_watch(info, op, snapc, mtime, inbl,
-                       OpCompletionVert<ceph::buffer::list>(
-                         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<ceph::async::Completion<
-                            void(boost::system::error_code,
-                                 ceph::buffer::list)>> onack,
-                          version_t *objver) {
-    return linger_notify(info, op, snap, inbl,
-                        OpCompletionVert<ceph::buffer::list>(
-                          std::move(onack)), objver);
-  }
   tl::expected<ceph::timespan,
               boost::system::error_code> linger_check(LingerOp *info);
   void linger_cancel(LingerOp *info);  // releases a reference
@@ -3886,12 +3838,6 @@ public:
     create_pool_snap(pool, snapName,
                     OpContextVert<ceph::buffer::list>(c, nullptr));
   }
-  void create_pool_snap(
-    int64_t pool, std::string_view snapName,
-    std::unique_ptr<ceph::async::Completion<PoolOp::OpSig>> c) {
-    create_pool_snap(pool, snapName,
-                    OpCompletionVert<ceph::buffer::list>(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<ceph::async::Completion<void(
-                                  boost::system::error_code, snapid_t)>> c) {
-    allocate_selfmanaged_snap(pool,
-                             OpCompletionVert<snapid_t>(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<ceph::buffer::list>(c, nullptr));
   }
-  void delete_pool_snap(int64_t pool, std::string_view snapName,
-                       std::unique_ptr<ceph::async::Completion<void(
-                          boost::system::error_code, ceph::buffer::list)>> c) {
-    delete_pool_snap(pool, snapName,
-                    OpCompletionVert<ceph::buffer::list>(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<ceph::buffer::list>(c, nullptr));
   }
-  void delete_selfmanaged_snap(int64_t pool, snapid_t snap,
-                              std::unique_ptr<ceph::async::Completion<void(
-                                 boost::system::error_code, ceph::buffer::list)>> c) {
-    delete_selfmanaged_snap(pool, snap,
-                           OpCompletionVert<ceph::buffer::list>(std::move(c)));
-  }
 
 
   void create_pool(std::string_view name,
@@ -3945,25 +3873,12 @@ public:
                OpContextVert<ceph::buffer::list>(onfinish, nullptr),
                crush_rule);
   }
-  void create_pool(std::string_view name,
-                  std::unique_ptr<ceph::async::Completion<void(
-                     boost::system::error_code, ceph::buffer::list)>> c,
-                  int crush_rule=-1) {
-    create_pool(name,
-               OpCompletionVert<ceph::buffer::list>(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<ceph::buffer::list>(onfinish, nullptr));
   }
-  void delete_pool(int64_t pool,
-                  std::unique_ptr<ceph::async::Completion<void(
-                    boost::system::error_code, ceph::buffer::list)>> c) {
-    delete_pool(pool, OpCompletionVert<ceph::buffer::list>(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<ceph::buffer::list>(onfinish, nullptr));
   }
-  void delete_pool(std::string_view name,
-                  std::unique_ptr<ceph::async::Completion<void(
-                     boost::system::error_code, ceph::buffer::list)>> c) {
-    delete_pool(name, OpCompletionVert<ceph::buffer::list>(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<int64_t> poolid,
-                   std::unique_ptr<ceph::async::Completion<void(
-                      boost::system::error_code, struct ceph_statfs)>> c) {
-    get_fs_stats_(poolid, OpCompletionVert<struct ceph_statfs>(std::move(c)));
-  }
   int statfs_op_cancel(ceph_tid_t tid, int r);
   void _finish_statfs_op(StatfsOp *op, int r);