DANGEROUS / TEST / DO NOT MERGE - Disable fsync
This commit is contained in:
parent
af2b2f26b4
commit
432131f5b8
@ -607,7 +607,7 @@ impl BlockManagerLocked {
|
|||||||
path2.set_extension("tmp");
|
path2.set_extension("tmp");
|
||||||
let mut f = fs::File::create(&path2).await?;
|
let mut f = fs::File::create(&path2).await?;
|
||||||
f.write_all(data).await?;
|
f.write_all(data).await?;
|
||||||
f.sync_all().await?;
|
//f.sync_all().await?;
|
||||||
drop(f);
|
drop(f);
|
||||||
|
|
||||||
fs::rename(path2, path).await?;
|
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
|
// Now, we do an fsync on the containing directory, to ensure that the rename
|
||||||
// is persisted properly. See:
|
// is persisted properly. See:
|
||||||
// http://thedjbway.b0llix.net/qmail/syncdir.html
|
// http://thedjbway.b0llix.net/qmail/syncdir.html
|
||||||
let dir = fs::OpenOptions::new()
|
/*let dir = fs::OpenOptions::new()
|
||||||
.read(true)
|
.read(true)
|
||||||
.mode(0)
|
.mode(0)
|
||||||
.open(directory)
|
.open(directory)
|
||||||
.await?;
|
.await?;
|
||||||
dir.sync_all().await?;
|
dir.sync_all().await?;
|
||||||
drop(dir);
|
drop(dir);*/
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user