Rename getUUID() into mustGetUUID() (#3320)

In case of UUID generation failure mustGetUUID() will panic than
infinitely trying in for loop.
This commit is contained in:
Bala FA
2016-11-22 16:52:37 -08:00
committed by Harshavardhana
parent 71b357e4f2
commit 1d4ac4b084
11 changed files with 36 additions and 41 deletions

View File

@@ -506,7 +506,7 @@ func healFormatXLFreshDisks(storageDisks []StorageAPI) error {
// From ordered disks fill the UUID position.
for index, disk := range orderedDisks {
if disk == nil {
newJBOD[index] = getUUID()
newJBOD[index] = mustGetUUID()
}
}
@@ -696,7 +696,7 @@ func healFormatXLCorruptedDisks(storageDisks []StorageAPI) error {
// From ordered disks fill the UUID position.
for index, disk := range orderedDisks {
if disk == nil {
newJBOD[index] = getUUID()
newJBOD[index] = mustGetUUID()
}
}
@@ -889,7 +889,7 @@ func initFormatXL(storageDisks []StorageAPI) (err error) {
Format: "xl",
XL: &xlFormat{
Version: "1",
Disk: getUUID(),
Disk: mustGetUUID(),
},
}
jbod[index] = formats[index].XL.Disk