aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--weed/storage/volume_vacuum.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/storage/volume_vacuum.go b/weed/storage/volume_vacuum.go
index 230fca104..c0bdcdf96 100644
--- a/weed/storage/volume_vacuum.go
+++ b/weed/storage/volume_vacuum.go
@@ -10,6 +10,9 @@ import (
)
func (v *Volume) garbageLevel() float64 {
+ if v.ContentSize() == 0 {
+ return 0
+ }
return float64(v.nm.DeletedSize()) / float64(v.ContentSize())
}