XL total/free space calculation is done inside xl module (#2945)

This commit is contained in:
Anis Elleuch
2016-10-16 22:24:15 +01:00
committed by Harshavardhana
parent a681af6953
commit 334cdb5d64
3 changed files with 7 additions and 11 deletions

View File

@@ -133,13 +133,9 @@ func printObjectAPIMsg() {
// Get formatted disk/storage info message.
func getStorageInfoMsg(storageInfo StorageInfo) string {
freeSpace := uint64(storageInfo.Free)
totalSpace := uint64(storageInfo.Total)
if storageInfo.Backend.Type == XL {
freeSpace /= 2
totalSpace /= 2
}
msg := fmt.Sprintf("%s %s Free, %s Total", colorBlue("Drive Capacity:"), humanize.IBytes(freeSpace), humanize.IBytes(totalSpace))
msg := fmt.Sprintf("%s %s Free, %s Total", colorBlue("Drive Capacity:"),
humanize.IBytes(uint64(storageInfo.Free)),
humanize.IBytes(uint64(storageInfo.Total)))
diskInfo := fmt.Sprintf(" %d Online, %d Offline. We can withstand [%d] more drive failure(s).",
storageInfo.Backend.OnlineDisks,
storageInfo.Backend.OfflineDisks,