From 49c25a15095630e516476bc4013d11c077d59aff Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 25 Feb 2021 10:53:33 +0100 Subject: Simulate stuff moving around --- src/model/block.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/model') diff --git a/src/model/block.rs b/src/model/block.rs index 0e1863cb..056d9098 100644 --- a/src/model/block.rs +++ b/src/model/block.rs @@ -426,6 +426,9 @@ impl BlockManager { } fn repair_aux_read_dir_rec<'a>(&'a self, path: &'a PathBuf, must_exit: &'a watch::Receiver) -> BoxFuture<'a, Result<(), Error>> { + // Lists all blocks on disk and adds them to the resync queue. + // 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. async move { let mut ls_data_dir = fs::read_dir(path).await?; while let Some(data_dir_ent) = ls_data_dir.next().await { -- cgit v1.2.3