From 9526328d386ab6261df416327c2efb0791369339 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 11 Sep 2023 12:10:48 +0200 Subject: scrub: clear saved checkpoint when canceling scrub --- src/block/repair.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/block/repair.rs b/src/block/repair.rs index bd14085f..a464e2b6 100644 --- a/src/block/repair.rs +++ b/src/block/repair.rs @@ -372,6 +372,9 @@ impl ScrubWorker { ScrubWorkerCommand::Cancel => { self.work = match std::mem::take(&mut self.work) { ScrubWorkerState::Running { .. } | ScrubWorkerState::Paused { .. } => { + if let Err(e) = self.persister.set_with(|x| x.checkpoint = None) { + error!("Could not save scrub checkpoint: {}", e); + } ScrubWorkerState::Finished } work => { -- cgit v1.2.3