Simulate stuff moving around

This commit is contained in:
Alex Auvolat
2021-02-25 10:53:33 +01:00
parent 5fe95ebae7
commit 49c25a1509
2 changed files with 110 additions and 68 deletions
+3
View File
@@ -426,6 +426,9 @@ impl BlockManager {
}
fn repair_aux_read_dir_rec<'a>(&'a self, path: &'a PathBuf, must_exit: &'a watch::Receiver<bool>) -> 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 {