Browse Source

avoid divided by zero

pull/1811/head
Chris Lu 4 years ago
parent
commit
ebf320ec22
  1. 3
      weed/storage/store.go

3
weed/storage/store.go

@ -471,6 +471,9 @@ func (s *Store) GetVolumeSizeLimit() uint64 {
func (s *Store) MaybeAdjustVolumeMax() (hasChanges bool) {
volumeSizeLimit := s.GetVolumeSizeLimit()
if volumeSizeLimit == 0 {
return
}
for _, diskLocation := range s.Locations {
if diskLocation.OriginalMaxVolumeCount == 0 {
currentMaxVolumeCount := diskLocation.MaxVolumeCount

Loading…
Cancel
Save