Skip to content

Commit eec5d0b

Browse files
committed
crimson/osd: convert remaining IOInterruptCondition users to specify epoch
Let's be explicit about this as allowing the epoch to be grabbed out of pg->get_osdmap_epoch() implicitely is going to be wrong fairly often. Signed-off-by: Samuel Just <[email protected]>
1 parent 61826ec commit eec5d0b

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

src/crimson/admin/pg_commands.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class ScrubCommand : public PGCommand {
174174
return PG::interruptor::now();
175175
}, [FNAME, pg](std::exception_ptr ep) {
176176
DEBUGDPP("interrupted with {}", *pg, ep);
177-
}, pg).then([format] {
177+
}, pg, pg->get_osdmap_epoch()).then([format] {
178178
std::unique_ptr<Formatter> f{
179179
Formatter::create(format, "json-pretty", "json-pretty")
180180
};

src/crimson/osd/osd_operations/client_request.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ seastar::future<> ClientRequest::with_pg_process(
246246
}, [FNAME, this, this_instance_id, pgref](std::exception_ptr eptr) {
247247
DEBUGDPP("{}.{}: interrupted due to {}",
248248
*pgref, *this, this_instance_id, eptr);
249-
}, pgref).finally(
249+
}, pgref, pgref->get_osdmap_epoch()).finally(
250250
[this, FNAME, opref=std::move(opref), pgref,
251251
this_instance_id, instance_handle=std::move(instance_handle), &ihref] {
252252
DEBUGDPP("{}.{}: exit", *pgref, *this, this_instance_id);

src/crimson/osd/osd_operations/logmissing_request.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ seastar::future<> LogMissingRequest::with_pg(
8989
});
9090
}, [](std::exception_ptr) {
9191
return seastar::now();
92-
}, pg).finally([this, ref=std::move(ref)] {
92+
}, pg, pg->get_osdmap_epoch()).finally([this, ref=std::move(ref)] {
9393
logger().debug("{}: exit", *this);
9494
handle.exit();
9595
});

src/crimson/osd/osd_operations/logmissing_request_reply.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ seastar::future<> LogMissingRequestReply::with_pg(
7575
});
7676
}, [](std::exception_ptr) {
7777
return seastar::now();
78-
}, pg).finally([this, ref=std::move(ref)] {
78+
}, pg, pg->get_osdmap_epoch()).finally([this, ref=std::move(ref)] {
7979
logger().debug("{}: exit", *this);
8080
handle.exit();
8181
});

src/crimson/osd/osd_operations/recovery_subrequest.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ seastar::future<> RecoverySubRequest::with_pg(
4343
});
4444
}, [](std::exception_ptr) {
4545
return seastar::now();
46-
}, pgref).finally([this, opref=std::move(opref), pgref] {
46+
}, pgref, pgref->get_osdmap_epoch()).finally([this, opref=std::move(opref), pgref] {
4747
logger().debug("{}: exit", *this);
4848
track_event<CompletionEvent>();
4949
handle.exit();

src/crimson/osd/osd_operations/replicated_request.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ seastar::future<> RepRequest::with_pg(
8888
});
8989
}, [](std::exception_ptr) {
9090
return seastar::now();
91-
}, pg).finally([this, ref=std::move(ref)] {
91+
}, pg, pg->get_osdmap_epoch()).finally([this, ref=std::move(ref)] {
9292
logger().debug("{}: exit", *this);
9393
handle.exit();
9494
});

src/crimson/osd/pg.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ void PG::on_active_actmap()
578578
}, [this](std::exception_ptr eptr) {
579579
logger().debug("{}: snap trimming interrupted", *this);
580580
ceph_assert(!peering_state.state_test(PG_STATE_SNAPTRIM));
581-
}, pg_ref).finally([pg_ref, this] {
581+
}, pg_ref, pg_ref->get_osdmap_epoch()).finally([pg_ref, this] {
582582
publish_stats_to_osd();
583583
});
584584
} else {

0 commit comments

Comments
 (0)