aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2022-09-24 09:21:24 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2022-09-24 09:21:24 +0200
commit432131f5b8c2aad113df3b295072a00756da47e7 (patch)
tree7ea428920ec579007188aaf6347b1621c007be51
parentaf2b2f26b4bd9fcdeedf2cd03f9e1392e5781abc (diff)
downloadgarage-432131f5b8c2aad113df3b295072a00756da47e7.tar.gz
garage-432131f5b8c2aad113df3b295072a00756da47e7.zip
DANGEROUS / TEST / DO NOT MERGE - Disable fsyncv0.8.0-dangerous-no-fsyncdangerous/no-fsync
-rw-r--r--src/block/manager.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/block/manager.rs b/src/block/manager.rs
index 7f439b96..7bef6138 100644
--- a/src/block/manager.rs
+++ b/src/block/manager.rs
@@ -607,7 +607,7 @@ impl BlockManagerLocked {
path2.set_extension("tmp");
let mut f = fs::File::create(&path2).await?;
f.write_all(data).await?;
- f.sync_all().await?;
+ //f.sync_all().await?;
drop(f);
fs::rename(path2, path).await?;
@@ -620,13 +620,13 @@ impl BlockManagerLocked {
// Now, we do an fsync on the containing directory, to ensure that the rename
// is persisted properly. See:
// http://thedjbway.b0llix.net/qmail/syncdir.html
- let dir = fs::OpenOptions::new()
+ /*let dir = fs::OpenOptions::new()
.read(true)
.mode(0)
.open(directory)
.await?;
dir.sync_all().await?;
- drop(dir);
+ drop(dir);*/
Ok(())
}