diff options
| author | Konstantin Lebedev <lebedev_k@tochka.com> | 2020-11-19 18:16:44 +0500 |
|---|---|---|
| committer | Konstantin Lebedev <lebedev_k@tochka.com> | 2020-11-19 18:16:44 +0500 |
| commit | 27e73de7975ff9f097bbfd8d2717aa27931f25b5 (patch) | |
| tree | 802f8cf0f7cc6834e03a24700a8d07a218f5bd86 /weed/storage/disk_location.go | |
| parent | e1190b3224638616cf4e1318ddcba0b1575f2130 (diff) | |
| parent | da04bb3d1bb60d92fdacfb2edd8c8bdba2643038 (diff) | |
| download | seaweedfs-27e73de7975ff9f097bbfd8d2717aa27931f25b5.tar.xz seaweedfs-27e73de7975ff9f097bbfd8d2717aa27931f25b5.zip | |
Merge branch 'upstream_master' into store_s3cred
# Conflicts:
# weed/s3api/filer_util.go
Diffstat (limited to 'weed/storage/disk_location.go')
| -rw-r--r-- | weed/storage/disk_location.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/weed/storage/disk_location.go b/weed/storage/disk_location.go index 1f58c9977..775ebf092 100644 --- a/weed/storage/disk_location.go +++ b/weed/storage/disk_location.go @@ -17,11 +17,12 @@ import ( ) type DiskLocation struct { - Directory string - MaxVolumeCount int - MinFreeSpacePercent float32 - volumes map[needle.VolumeId]*Volume - volumesLock sync.RWMutex + Directory string + MaxVolumeCount int + OriginalMaxVolumeCount int + MinFreeSpacePercent float32 + volumes map[needle.VolumeId]*Volume + volumesLock sync.RWMutex // erasure coding ecVolumes map[needle.VolumeId]*erasure_coding.EcVolume @@ -31,7 +32,7 @@ type DiskLocation struct { } func NewDiskLocation(dir string, maxVolumeCount int, minFreeSpacePercent float32) *DiskLocation { - location := &DiskLocation{Directory: dir, MaxVolumeCount: maxVolumeCount, MinFreeSpacePercent: minFreeSpacePercent} + location := &DiskLocation{Directory: dir, MaxVolumeCount: maxVolumeCount, OriginalMaxVolumeCount: maxVolumeCount, MinFreeSpacePercent: minFreeSpacePercent} location.volumes = make(map[needle.VolumeId]*Volume) location.ecVolumes = make(map[needle.VolumeId]*erasure_coding.EcVolume) go location.CheckDiskSpace() |
