aboutsummaryrefslogtreecommitdiff
path: root/src/block/repair.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-09-02 16:47:15 +0200
committerAlex Auvolat <alex@adnab.me>2022-09-02 16:47:15 +0200
commit47be652a1fe08a8e6dab6aa2c4a41d8eb119f392 (patch)
tree9e7d1c9513fb6a4727dca8c66e96e61cf693bbd8 /src/block/repair.rs
parent943d76c583f5740b1d922275a673233a27fe1693 (diff)
downloadgarage-47be652a1fe08a8e6dab6aa2c4a41d8eb119f392.tar.gz
garage-47be652a1fe08a8e6dab6aa2c4a41d8eb119f392.zip
block manager: refactor: split resync into separate file
Diffstat (limited to 'src/block/repair.rs')
-rw-r--r--src/block/repair.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/block/repair.rs b/src/block/repair.rs
index 18e1de95..e2884b69 100644
--- a/src/block/repair.rs
+++ b/src/block/repair.rs
@@ -112,7 +112,9 @@ impl Worker for RepairWorker {
}
for hash in batch_of_hashes.into_iter() {
- self.manager.put_to_resync(&hash, Duration::from_secs(0))?;
+ self.manager
+ .resync
+ .put_to_resync(&hash, Duration::from_secs(0))?;
self.next_start = Some(hash)
}
@@ -124,7 +126,9 @@ impl Worker for RepairWorker {
// This allows us to find blocks we are storing but don't actually need,
// so that we can offload them if necessary and then delete them locally.
if let Some(hash) = bi.next().await? {
- self.manager.put_to_resync(&hash, Duration::from_secs(0))?;
+ self.manager
+ .resync
+ .put_to_resync(&hash, Duration::from_secs(0))?;
Ok(WorkerState::Busy)
} else {
Ok(WorkerState::Done)