aboutsummaryrefslogtreecommitdiff
path: root/src/model/block.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-02-25 10:53:33 +0100
committerAlex Auvolat <alex@adnab.me>2021-02-25 10:53:33 +0100
commit49c25a15095630e516476bc4013d11c077d59aff (patch)
tree30f855f1f3c186659fd661a5eaacbcf815c92370 /src/model/block.rs
parent5fe95ebae7c134491b198dd60518484425365fb2 (diff)
downloadgarage-49c25a15095630e516476bc4013d11c077d59aff.tar.gz
garage-49c25a15095630e516476bc4013d11c077d59aff.zip
Simulate stuff moving around
Diffstat (limited to 'src/model/block.rs')
-rw-r--r--src/model/block.rs3
1 files changed, 3 insertions, 0 deletions
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<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 {