Implement support for calculating disk usage per tenant (#5969)

Fixes #5961
This commit is contained in:
Harshavardhana
2018-05-23 03:11:29 -07:00
committed by Nitish Tiwari
parent 483fe4bed5
commit e6ec645035
23 changed files with 328 additions and 81 deletions

View File

@@ -282,6 +282,7 @@ func (s *xlSets) StorageInfo(ctx context.Context) StorageInfo {
lstorageInfo := set.StorageInfo(ctx)
storageInfo.Total = storageInfo.Total + lstorageInfo.Total
storageInfo.Free = storageInfo.Free + lstorageInfo.Free
storageInfo.Used = storageInfo.Used + lstorageInfo.Used
storageInfo.Backend.OnlineDisks = storageInfo.Backend.OnlineDisks + lstorageInfo.Backend.OnlineDisks
storageInfo.Backend.OfflineDisks = storageInfo.Backend.OfflineDisks + lstorageInfo.Backend.OfflineDisks
}