mirror of
https://github.com/pgsty/minio.git
synced 2026-07-24 14:36:15 +03:00
add additional fdatasync before close() on writes (#9947)
This commit is contained in:
+4
-1
@@ -1694,7 +1694,10 @@ func (s *xlStorage) CreateFile(volume, path string, fileSize int64, r io.Reader)
|
||||
return err
|
||||
}
|
||||
|
||||
defer w.Close()
|
||||
defer func() {
|
||||
disk.Fdatasync(w) // Only interested in flushing the size_t not mtime/atime
|
||||
w.Close()
|
||||
}()
|
||||
|
||||
bufp := s.pool.Get().(*[]byte)
|
||||
defer s.pool.Put(bufp)
|
||||
|
||||
Reference in New Issue
Block a user