mirror of
https://github.com/kharonsec/garage.git
synced 2026-04-25 20:44:55 +02:00
fix silent write errors (#1360)
same as #1358 for garage-v2 Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1360 Co-authored-by: trinity-1686a <trinity@deuxfleurs.fr> Co-committed-by: trinity-1686a <trinity@deuxfleurs.fr>
This commit is contained in:
@@ -789,6 +789,7 @@ impl BlockManagerLocked {
|
|||||||
|
|
||||||
let mut f = fs::File::create(&path_tmp).await?;
|
let mut f = fs::File::create(&path_tmp).await?;
|
||||||
f.write_all(data).await?;
|
f.write_all(data).await?;
|
||||||
|
f.flush().await?;
|
||||||
mgr.metrics.bytes_written.add(data.len() as u64);
|
mgr.metrics.bytes_written.add(data.len() as u64);
|
||||||
|
|
||||||
if mgr.data_fsync {
|
if mgr.data_fsync {
|
||||||
|
|||||||
Reference in New Issue
Block a user