Skip to content

Commit de709e1

Browse files
authored
Merge pull request ceph#60306 from cbodley/wip-osdc-rm-completion
osdc: remove unused overloads for async::Completion Reviewed-by: Adam Emerson <[email protected]> Reviewed-by: Patrick Donnelly <[email protected]>
2 parents 68e73b3 + c4c6474 commit de709e1

File tree

1 file changed

+0
-95
lines changed

1 file changed

+0
-95
lines changed

src/osdc/Objecter.h

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
#include "include/function2.hpp"
4949
#include "include/neorados/RADOS_Decodable.hpp"
5050

51-
#include "common/async/completion.h"
5251
#include "common/admin_socket.h"
5352
#include "common/ceph_time.h"
5453
#include "common/ceph_mutex.h"
@@ -1968,30 +1967,6 @@ class Objecter : public md_config_obs_t, public Dispatcher {
19681967
}
19691968
}
19701969

1971-
boost::asio::any_completion_handler<void(boost::system::error_code)>
1972-
OpCompletionVert(std::unique_ptr<ceph::async::Completion<
1973-
void(boost::system::error_code)>> c) {
1974-
if (c)
1975-
return [c = std::move(c)](boost::system::error_code ec) mutable {
1976-
c->dispatch(std::move(c), ec);
1977-
};
1978-
else
1979-
return nullptr;
1980-
}
1981-
1982-
template<typename T>
1983-
boost::asio::any_completion_handler<void(boost::system::error_code, T)>
1984-
OpCompletionVert(std::unique_ptr<ceph::async::Completion<
1985-
void(boost::system::error_code, T)>> c) {
1986-
if (c) {
1987-
return [c = std::move(c)](boost::system::error_code ec, T t) mutable {
1988-
c->dispatch(std::move(c), ec, std::move(t));
1989-
};
1990-
} else {
1991-
return nullptr;
1992-
}
1993-
}
1994-
19951970
struct Op : public RefCountedObject {
19961971
OSDSession *session = nullptr;
19971972
int incarnation = 0;
@@ -3268,18 +3243,6 @@ class Objecter : public md_config_obs_t, public Dispatcher {
32683243
return linger_watch(info, op, snapc, mtime, inbl,
32693244
OpContextVert<ceph::buffer::list>(onfinish, nullptr), objver);
32703245
}
3271-
ceph_tid_t linger_watch(LingerOp *info,
3272-
ObjectOperation& op,
3273-
const SnapContext& snapc, ceph::real_time mtime,
3274-
ceph::buffer::list& inbl,
3275-
std::unique_ptr<ceph::async::Completion<
3276-
void(boost::system::error_code,
3277-
ceph::buffer::list)>> onfinish,
3278-
version_t *objver) {
3279-
return linger_watch(info, op, snapc, mtime, inbl,
3280-
OpCompletionVert<ceph::buffer::list>(
3281-
std::move(onfinish)), objver);
3282-
}
32833246
ceph_tid_t linger_notify(LingerOp *info,
32843247
ObjectOperation& op,
32853248
snapid_t snap, ceph::buffer::list& inbl,
@@ -3295,17 +3258,6 @@ class Objecter : public md_config_obs_t, public Dispatcher {
32953258
OpContextVert(onack, poutbl),
32963259
objver);
32973260
}
3298-
ceph_tid_t linger_notify(LingerOp *info,
3299-
ObjectOperation& op,
3300-
snapid_t snap, ceph::buffer::list& inbl,
3301-
std::unique_ptr<ceph::async::Completion<
3302-
void(boost::system::error_code,
3303-
ceph::buffer::list)>> onack,
3304-
version_t *objver) {
3305-
return linger_notify(info, op, snap, inbl,
3306-
OpCompletionVert<ceph::buffer::list>(
3307-
std::move(onack)), objver);
3308-
}
33093261
tl::expected<ceph::timespan,
33103262
boost::system::error_code> linger_check(LingerOp *info);
33113263
void linger_cancel(LingerOp *info); // releases a reference
@@ -3886,12 +3838,6 @@ class Objecter : public md_config_obs_t, public Dispatcher {
38863838
create_pool_snap(pool, snapName,
38873839
OpContextVert<ceph::buffer::list>(c, nullptr));
38883840
}
3889-
void create_pool_snap(
3890-
int64_t pool, std::string_view snapName,
3891-
std::unique_ptr<ceph::async::Completion<PoolOp::OpSig>> c) {
3892-
create_pool_snap(pool, snapName,
3893-
OpCompletionVert<ceph::buffer::list>(std::move(c)));
3894-
}
38953841
void allocate_selfmanaged_snap(int64_t pool,
38963842
boost::asio::any_completion_handler<
38973843
void(boost::system::error_code,
@@ -3901,25 +3847,13 @@ class Objecter : public md_config_obs_t, public Dispatcher {
39013847
allocate_selfmanaged_snap(pool,
39023848
OpContextVert(c, psnapid));
39033849
}
3904-
void allocate_selfmanaged_snap(int64_t pool,
3905-
std::unique_ptr<ceph::async::Completion<void(
3906-
boost::system::error_code, snapid_t)>> c) {
3907-
allocate_selfmanaged_snap(pool,
3908-
OpCompletionVert<snapid_t>(std::move(c)));
3909-
}
39103850
void delete_pool_snap(int64_t pool, std::string_view snapName,
39113851
decltype(PoolOp::onfinish)&& onfinish);
39123852
void delete_pool_snap(int64_t pool, std::string_view snapName,
39133853
Context* c) {
39143854
delete_pool_snap(pool, snapName,
39153855
OpContextVert<ceph::buffer::list>(c, nullptr));
39163856
}
3917-
void delete_pool_snap(int64_t pool, std::string_view snapName,
3918-
std::unique_ptr<ceph::async::Completion<void(
3919-
boost::system::error_code, ceph::buffer::list)>> c) {
3920-
delete_pool_snap(pool, snapName,
3921-
OpCompletionVert<ceph::buffer::list>(std::move(c)));
3922-
}
39233857

39243858
void delete_selfmanaged_snap(int64_t pool, snapid_t snap,
39253859
decltype(PoolOp::onfinish)&& onfinish);
@@ -3928,12 +3862,6 @@ class Objecter : public md_config_obs_t, public Dispatcher {
39283862
delete_selfmanaged_snap(pool, snap,
39293863
OpContextVert<ceph::buffer::list>(c, nullptr));
39303864
}
3931-
void delete_selfmanaged_snap(int64_t pool, snapid_t snap,
3932-
std::unique_ptr<ceph::async::Completion<void(
3933-
boost::system::error_code, ceph::buffer::list)>> c) {
3934-
delete_selfmanaged_snap(pool, snap,
3935-
OpCompletionVert<ceph::buffer::list>(std::move(c)));
3936-
}
39373865

39383866

39393867
void create_pool(std::string_view name,
@@ -3945,25 +3873,12 @@ class Objecter : public md_config_obs_t, public Dispatcher {
39453873
OpContextVert<ceph::buffer::list>(onfinish, nullptr),
39463874
crush_rule);
39473875
}
3948-
void create_pool(std::string_view name,
3949-
std::unique_ptr<ceph::async::Completion<void(
3950-
boost::system::error_code, ceph::buffer::list)>> c,
3951-
int crush_rule=-1) {
3952-
create_pool(name,
3953-
OpCompletionVert<ceph::buffer::list>(std::move(c)),
3954-
crush_rule);
3955-
}
39563876
void delete_pool(int64_t pool,
39573877
decltype(PoolOp::onfinish)&& onfinish);
39583878
void delete_pool(int64_t pool,
39593879
Context* onfinish) {
39603880
delete_pool(pool, OpContextVert<ceph::buffer::list>(onfinish, nullptr));
39613881
}
3962-
void delete_pool(int64_t pool,
3963-
std::unique_ptr<ceph::async::Completion<void(
3964-
boost::system::error_code, ceph::buffer::list)>> c) {
3965-
delete_pool(pool, OpCompletionVert<ceph::buffer::list>(std::move(c)));
3966-
}
39673882

39683883
void delete_pool(std::string_view name,
39693884
decltype(PoolOp::onfinish)&& onfinish);
@@ -3972,11 +3887,6 @@ class Objecter : public md_config_obs_t, public Dispatcher {
39723887
Context* onfinish) {
39733888
delete_pool(name, OpContextVert<ceph::buffer::list>(onfinish, nullptr));
39743889
}
3975-
void delete_pool(std::string_view name,
3976-
std::unique_ptr<ceph::async::Completion<void(
3977-
boost::system::error_code, ceph::buffer::list)>> c) {
3978-
delete_pool(name, OpCompletionVert<ceph::buffer::list>(std::move(c)));
3979-
}
39803890

39813891
void handle_pool_op_reply(MPoolOpReply *m);
39823892
int pool_op_cancel(ceph_tid_t tid, int r);
@@ -4026,11 +3936,6 @@ class Objecter : public md_config_obs_t, public Dispatcher {
40263936
Context *onfinish) {
40273937
get_fs_stats_(poolid, OpContextVert(onfinish, result));
40283938
}
4029-
void get_fs_stats(std::optional<int64_t> poolid,
4030-
std::unique_ptr<ceph::async::Completion<void(
4031-
boost::system::error_code, struct ceph_statfs)>> c) {
4032-
get_fs_stats_(poolid, OpCompletionVert<struct ceph_statfs>(std::move(c)));
4033-
}
40343939
int statfs_op_cancel(ceph_tid_t tid, int r);
40353940
void _finish_statfs_op(StatfsOp *op, int r);
40363941

0 commit comments

Comments
 (0)