mirror of
https://github.com/pgsty/minio.git
synced 2026-08-07 08:11:13 +03:00
add additional fdatasync before close() on writes (#9947)
This commit is contained in:
+4
-1
@@ -1341,7 +1341,10 @@ func (s *posix) CreateFile(volume, path string, fileSize int64, r io.Reader) (er
|
||||
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