@@ -258,9 +258,10 @@ ScrubScan::ifut<> ScrubScan::deep_scan_object(
258258 DEBUGDPP (" obj: {}" , pg, obj);
259259 using crimson::common::local_conf;
260260 auto &entry = ret.objects [obj.hobj ];
261+ auto progress_ref = std::make_unique<obj_scrub_progress_t >();
262+ auto &progress = *progress_ref;
261263 return interruptor::repeat (
262- [FNAME, this , progress = obj_scrub_progress_t (),
263- &obj, &entry, &pg]() mutable
264+ [FNAME, this , &progress, &obj, &entry, &pg]()
264265 -> interruptible_future<seastar::stop_iteration> {
265266 if (progress.offset ) {
266267 DEBUGDPP (" op: {}, obj: {}, progress: {} scanning data" ,
@@ -272,7 +273,10 @@ ScrubScan::ifut<> ScrubScan::deep_scan_object(
272273 obj,
273274 *(progress.offset ),
274275 stride
275- ).safe_then ([stride, &progress, &entry](auto bl) {
276+ ).safe_then ([this , FNAME, stride, &obj, &progress, &entry, &pg](auto bl) {
277+ size_t offset = *progress.offset ;
278+ DEBUGDPP (" op: {}, obj: {}, progress: {} got offset {}" ,
279+ pg, *this , obj, progress, offset);
276280 progress.data_hash << bl;
277281 if (bl.length () < stride) {
278282 progress.offset = std::nullopt ;
@@ -373,7 +377,7 @@ ScrubScan::ifut<> ScrubScan::deep_scan_object(
373377 seastar::make_ready_future<seastar::stop_iteration>(
374378 seastar::stop_iteration::yes));
375379 }
376- });
380+ }). finally ([progress_ref= std::move (progress_ref)] {}) ;
377381}
378382
379383template class ScrubAsyncOpT <ScrubScan>;
0 commit comments