aboutsummaryrefslogtreecommitdiff
path: root/src/block/manager.rs
diff options
context:
space:
mode:
authorteutat3s <10206665+teutat3s@users.noreply.github.com>2023-03-13 13:59:42 +0100
committerteutat3s <10206665+teutat3s@users.noreply.github.com>2023-03-13 13:59:42 +0100
commit8ad6efb338bd20036614dd0697edb328aed1e7fd (patch)
treebef0b3bb43be503b5459e610f782e658562cf3bf /src/block/manager.rs
parent3b498c7c4725ab83edd5fdeba65b32ae6bdc3e66 (diff)
parent3325928c1327eb35201723013388ede2399f2350 (diff)
downloadgarage-8ad6efb338bd20036614dd0697edb328aed1e7fd.tar.gz
garage-8ad6efb338bd20036614dd0697edb328aed1e7fd.zip
Merge branch 'main' into pnet_datalink-0.33.0
Diffstat (limited to 'src/block/manager.rs')
-rw-r--r--src/block/manager.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/block/manager.rs b/src/block/manager.rs
index 051a9f93..26278974 100644
--- a/src/block/manager.rs
+++ b/src/block/manager.rs
@@ -152,6 +152,7 @@ impl BlockManager {
tx_scrub_command: ArcSwapOption::new(None),
});
block_manager.endpoint.set_handler(block_manager.clone());
+ block_manager.scrub_persister.set_with(|_| ()).unwrap();
block_manager
}
@@ -185,6 +186,9 @@ impl BlockManager {
vars.register_ro(&self.scrub_persister, "scrub-last-completed", |p| {
p.get_with(|x| msec_to_rfc3339(x.time_last_complete_scrub))
});
+ vars.register_ro(&self.scrub_persister, "scrub-next-run", |p| {
+ p.get_with(|x| msec_to_rfc3339(x.time_next_run_scrub))
+ });
vars.register_ro(&self.scrub_persister, "scrub-corruptions_detected", |p| {
p.get_with(|x| x.corruptions_detected)
});