Add sync mode for 'xl.json' (#6798)

xl.json is the source of truth for all erasure
coded objects, without which we won't be able to
read the objects properly. This PR enables sync
mode for writing `xl.json` such all writes go hit
the disk and are persistent under situations such
as abrupt power failures on servers running Minio.
This commit is contained in:
Harshavardhana
2018-11-14 06:18:35 -08:00
committed by Nitish Tiwari
parent cf26c937e4
commit f1f23f6f11
7 changed files with 87 additions and 8 deletions

View File

@@ -47,6 +47,9 @@ type StorageAPI interface {
StatFile(volume string, path string) (file FileInfo, err error)
DeleteFile(volume string, path string) (err error)
// Write all data, syncs the data to disk.
WriteAll(volume string, path string, buf []byte) (err error)
// Read all.
ReadAll(volume string, path string) (buf []byte, err error)
}