FS: check whether disk format is FS or not. (#2083)

Fixes #2060
This commit is contained in:
Bala FA
2016-07-04 08:31:40 +05:30
committed by Harshavardhana
parent 355f06cfea
commit 52b55afce0
4 changed files with 55 additions and 4 deletions
+5
View File
@@ -93,6 +93,11 @@ func newFSFormatV1() (format formatConfigV1) {
}
}
// isFSFormat - returns whether given formatConfigV1 is FS type or not.
func isFSFormat(format formatConfigV1) bool {
return format.Format == "fs"
}
// writes FS format (format.json) into minioMetaBucket.
func writeFSFormatData(storage StorageAPI, fsFormat formatConfigV1) error {
metadataBytes, err := json.Marshal(fsFormat)