aboutsummaryrefslogtreecommitdiff
path: root/src/block
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-07-08 10:45:20 +0200
committerAlex Auvolat <alex@adnab.me>2022-07-08 10:45:20 +0200
commit08cd5f2f1d4a42e63a256eb3a7811e874d222fe4 (patch)
tree256ee885e93cf1c41dc2869fe13a648aa91ab9b5 /src/block
parent18d014dcc5840e5eae8581a5bfa846aad93beeea (diff)
downloadgarage-background-task-manager.tar.gz
garage-background-task-manager.zip
Diffstat (limited to 'src/block')
-rw-r--r--src/block/manager.rs5
-rw-r--r--src/block/repair.rs10
2 files changed, 3 insertions, 12 deletions
diff --git a/src/block/manager.rs b/src/block/manager.rs
index e54fb992..017ba9da 100644
--- a/src/block/manager.rs
+++ b/src/block/manager.rs
@@ -773,10 +773,7 @@ impl Worker for ResyncWorker {
}
}
- async fn work(
- &mut self,
- _must_exit: &mut watch::Receiver<bool>,
- ) -> Result<WorkerState, Error> {
+ async fn work(&mut self, _must_exit: &mut watch::Receiver<bool>) -> Result<WorkerState, Error> {
self.tranquilizer.reset();
match self.manager.resync_iter().await {
Ok(ResyncIterResult::BusyDidSomething) => Ok(self
diff --git a/src/block/repair.rs b/src/block/repair.rs
index cd5afe44..07ff6772 100644
--- a/src/block/repair.rs
+++ b/src/block/repair.rs
@@ -62,10 +62,7 @@ impl Worker for RepairWorker {
}
}
- async fn work(
- &mut self,
- _must_exit: &mut watch::Receiver<bool>,
- ) -> Result<WorkerState, Error> {
+ async fn work(&mut self, _must_exit: &mut watch::Receiver<bool>) -> Result<WorkerState, Error> {
match self.block_iter.as_mut() {
None => {
// Phase 1: Repair blocks from RC table.
@@ -279,10 +276,7 @@ impl Worker for ScrubWorker {
))
}
- async fn work(
- &mut self,
- _must_exit: &mut watch::Receiver<bool>,
- ) -> Result<WorkerState, Error> {
+ async fn work(&mut self, _must_exit: &mut watch::Receiver<bool>) -> Result<WorkerState, Error> {
match self.rx_cmd.try_recv() {
Ok(cmd) => self.handle_cmd(cmd).await,
Err(mpsc::error::TryRecvError::Disconnected) => return Ok(WorkerState::Done),