mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
add additional fdatasync before close() on writes (#9947)
This commit is contained in:
@@ -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