Skip to content

Commit 5b0416a

Browse files
committed
crimson/.../scrub_events: convert ScrubFindRange::run to a coroutine
Signed-off-by: Samuel Just <[email protected]>
1 parent 6021129 commit 5b0416a

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

src/crimson/osd/osd_operations/scrub_events.cc

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -88,24 +88,21 @@ ScrubFindRange::ifut<> ScrubFindRange::run(PG &pg)
8888
{
8989
LOG_PREFIX(ScrubFindRange::run);
9090
using crimson::common::local_conf;
91-
return interruptor::make_interruptible(
91+
auto [_, next] = co_await interruptor::make_interruptible(
9292
pg.shard_services.get_store().list_objects(
9393
pg.get_collection_ref(),
9494
ghobject_t(begin, ghobject_t::NO_GEN, pg.get_pgid().shard),
9595
ghobject_t::get_max(),
9696
local_conf().get_val<int64_t>("osd_scrub_chunk_max")
97-
)
98-
).then_interruptible([FNAME, this, &pg](auto ret) {
99-
auto &[_, next] = ret;
97+
));
10098

101-
// We rely on seeing an entire set of snapshots in a single chunk
102-
auto end = next.hobj.get_max_object_boundary();
99+
// We rely on seeing an entire set of snapshots in a single chunk
100+
auto end = next.hobj.get_max_object_boundary();
103101

104-
DEBUGDPP("got next.hobj: {}, returning begin, end: {}, {}",
105-
pg, next.hobj, begin, end);
106-
pg.scrubber.machine.process_event(
107-
scrub::ScrubContext::request_range_complete_t{begin, end});
108-
});
102+
DEBUGDPP("got next.hobj: {}, returning begin, end: {}, {}",
103+
pg, next.hobj, begin, end);
104+
pg.scrubber.machine.process_event(
105+
scrub::ScrubContext::request_range_complete_t{begin, end});
109106
}
110107

111108
template class ScrubAsyncOpT<ScrubFindRange>;

0 commit comments

Comments
 (0)