Skip to content

Commit 55fcd87

Browse files
authored
Merge pull request ceph#52032 from Matan-B/wip-matanb-crimson-no-ignore
crimson/osd: don't ignore start_pg_operation returned future Reviewed-by: Samuel Just <[email protected]>
2 parents 6bd7cd4 + 43bf04e commit 55fcd87

File tree

1 file changed

+18
-23
lines changed

1 file changed

+18
-23
lines changed

src/crimson/osd/osd.cc

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,18 +1146,18 @@ seastar::future<> OSD::ShardDispatcher::handle_osd_op(
11461146
crimson::net::ConnectionRef conn,
11471147
Ref<MOSDOp> m)
11481148
{
1149-
(void) pg_shard_manager.start_pg_operation<ClientRequest>(
1149+
return pg_shard_manager.start_pg_operation<ClientRequest>(
11501150
get_shard_services(),
11511151
conn,
1152-
std::move(m));
1153-
return seastar::now();
1152+
std::move(m)).second;
11541153
}
11551154

11561155
seastar::future<> OSD::ShardDispatcher::handle_pg_create(
11571156
crimson::net::ConnectionRef conn,
11581157
Ref<MOSDPGCreate2> m)
11591158
{
1160-
for (auto& [pgid, when] : m->pgs) {
1159+
return seastar::do_for_each(m->pgs, [this, conn, m](auto& pg) {
1160+
auto& [pgid, when] = pg;
11611161
const auto &[created, created_stamp] = when;
11621162
auto q = m->pg_extra.find(pgid);
11631163
ceph_assert(q != m->pg_extra.end());
@@ -1174,52 +1174,49 @@ seastar::future<> OSD::ShardDispatcher::handle_pg_create(
11741174
"unmatched past_intervals {} (history {})",
11751175
pgid, m->epoch,
11761176
pi, history);
1177+
return seastar::now();
11771178
} else {
1178-
std::ignore = pg_shard_manager.start_pg_operation<RemotePeeringEvent>(
1179+
return pg_shard_manager.start_pg_operation<RemotePeeringEvent>(
11791180
conn,
11801181
pg_shard_t(),
11811182
pgid,
11821183
m->epoch,
11831184
m->epoch,
11841185
NullEvt(),
11851186
true,
1186-
new PGCreateInfo(pgid, m->epoch, history, pi, true));
1187+
new PGCreateInfo(pgid, m->epoch, history, pi, true)).second;
11871188
}
1188-
}
1189-
return seastar::now();
1189+
});
11901190
}
11911191

11921192
seastar::future<> OSD::ShardDispatcher::handle_update_log_missing(
11931193
crimson::net::ConnectionRef conn,
11941194
Ref<MOSDPGUpdateLogMissing> m)
11951195
{
11961196
m->decode_payload();
1197-
(void) pg_shard_manager.start_pg_operation<LogMissingRequest>(
1197+
return pg_shard_manager.start_pg_operation<LogMissingRequest>(
11981198
std::move(conn),
1199-
std::move(m));
1200-
return seastar::now();
1199+
std::move(m)).second;
12011200
}
12021201

12031202
seastar::future<> OSD::ShardDispatcher::handle_update_log_missing_reply(
12041203
crimson::net::ConnectionRef conn,
12051204
Ref<MOSDPGUpdateLogMissingReply> m)
12061205
{
12071206
m->decode_payload();
1208-
(void) pg_shard_manager.start_pg_operation<LogMissingRequestReply>(
1207+
return pg_shard_manager.start_pg_operation<LogMissingRequestReply>(
12091208
std::move(conn),
1210-
std::move(m));
1211-
return seastar::now();
1209+
std::move(m)).second;
12121210
}
12131211

12141212
seastar::future<> OSD::ShardDispatcher::handle_rep_op(
12151213
crimson::net::ConnectionRef conn,
12161214
Ref<MOSDRepOp> m)
12171215
{
12181216
m->finish_decode();
1219-
std::ignore = pg_shard_manager.start_pg_operation<RepRequest>(
1217+
return pg_shard_manager.start_pg_operation<RepRequest>(
12201218
std::move(conn),
1221-
std::move(m));
1222-
return seastar::now();
1219+
std::move(m)).second;
12231220
}
12241221

12251222
seastar::future<> OSD::ShardDispatcher::handle_rep_op_reply(
@@ -1276,9 +1273,8 @@ seastar::future<> OSD::ShardDispatcher::handle_recovery_subreq(
12761273
crimson::net::ConnectionRef conn,
12771274
Ref<MOSDFastDispatchOp> m)
12781275
{
1279-
std::ignore = pg_shard_manager.start_pg_operation<RecoverySubRequest>(
1280-
conn, std::move(m));
1281-
return seastar::now();
1276+
return pg_shard_manager.start_pg_operation<RecoverySubRequest>(
1277+
conn, std::move(m)).second;
12821278
}
12831279

12841280
bool OSD::should_restart() const
@@ -1371,12 +1367,11 @@ seastar::future<> OSD::ShardDispatcher::handle_peering_op(
13711367
logger().debug("handle_peering_op on {} from {}", m->get_spg(), from);
13721368
m->set_features(conn->get_features());
13731369
std::unique_ptr<PGPeeringEvent> evt(m->get_event());
1374-
(void) pg_shard_manager.start_pg_operation<RemotePeeringEvent>(
1370+
return pg_shard_manager.start_pg_operation<RemotePeeringEvent>(
13751371
conn,
13761372
pg_shard_t{from, m->get_spg().shard},
13771373
m->get_spg(),
1378-
std::move(*evt));
1379-
return seastar::now();
1374+
std::move(*evt)).second;
13801375
}
13811376

13821377
seastar::future<> OSD::ShardDispatcher::check_osdmap_features()

0 commit comments

Comments
 (0)