diff options
| author | Evgenii Kozlov <e.kozlov@searchinform.ru> | 2020-06-05 19:00:38 +0300 |
|---|---|---|
| committer | Evgenii Kozlov <e.kozlov@searchinform.ru> | 2020-06-05 19:00:38 +0300 |
| commit | 2410ffbd79c36d35846e65d7502ca95fcf370d84 (patch) | |
| tree | db909cf7bf1592d953b64586ffa622b4706e477a /weed/storage | |
| parent | 0e0db70f5537d5325f6f4d1b0de4a301207e3620 (diff) | |
| download | seaweedfs-2410ffbd79c36d35846e65d7502ca95fcf370d84.tar.xz seaweedfs-2410ffbd79c36d35846e65d7502ca95fcf370d84.zip | |
Name fix
Diffstat (limited to 'weed/storage')
| -rw-r--r-- | weed/storage/disk_location.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/storage/disk_location.go b/weed/storage/disk_location.go index ba4d25635..dafc0fb4a 100644 --- a/weed/storage/disk_location.go +++ b/weed/storage/disk_location.go @@ -18,7 +18,7 @@ import ( type DiskLocation struct { Directory string MaxVolumeCount int - FreeDiskSpaceWatermark float32 + MinFreeSpacePercent float32 volumes map[needle.VolumeId]*Volume volumesLock sync.RWMutex @@ -27,8 +27,8 @@ type DiskLocation struct { ecVolumesLock sync.RWMutex } -func NewDiskLocation(dir string, maxVolumeCount int, freeDiskSpaceWatermark float32) *DiskLocation { - location := &DiskLocation{Directory: dir, MaxVolumeCount: maxVolumeCount, FreeDiskSpaceWatermark: freeDiskSpaceWatermark} +func NewDiskLocation(dir string, maxVolumeCount int, minFreeSpacePercent float32) *DiskLocation { + location := &DiskLocation{Directory: dir, MaxVolumeCount: maxVolumeCount, MinFreeSpacePercent: minFreeSpacePercent} location.volumes = make(map[needle.VolumeId]*Volume) location.ecVolumes = make(map[needle.VolumeId]*erasure_coding.EcVolume) go location.CheckDiskSpace() @@ -305,7 +305,7 @@ func (l *DiskLocation) CheckDiskSpace() { for _ = range t.C { if dir, e := filepath.Abs(l.Directory); e == nil { s := stats.NewDiskStatus(dir) - if (s.PercentFree < l.FreeDiskSpaceWatermark) != lastStat { + if (s.PercentFree < l.MinFreeSpacePercent) != lastStat { lastStat = !lastStat for _, v := range l.volumes { v.SetLowDiskSpace(lastStat) |
