aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/disk_location.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-12-13 03:11:24 -0800
committerChris Lu <chris.lu@gmail.com>2020-12-13 03:11:24 -0800
commitd156c74ec097add1954fa2a0a9a55eb02b44bb0e (patch)
tree872edef3665d27b852631303f031aa97470f4ad5 /weed/storage/disk_location.go
parente9cd798bd372741753efcba2af594b00fe7b8437 (diff)
downloadseaweedfs-d156c74ec097add1954fa2a0a9a55eb02b44bb0e.tar.xz
seaweedfs-d156c74ec097add1954fa2a0a9a55eb02b44bb0e.zip
volume server set volume type and heartbeat to the master
Diffstat (limited to 'weed/storage/disk_location.go')
-rw-r--r--weed/storage/disk_location.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/storage/disk_location.go b/weed/storage/disk_location.go
index 2d4d120af..ef224cc4a 100644
--- a/weed/storage/disk_location.go
+++ b/weed/storage/disk_location.go
@@ -19,6 +19,7 @@ import (
type DiskLocation struct {
Directory string
IdxDirectory string
+ VolumeType VolumeType
MaxVolumeCount int
OriginalMaxVolumeCount int
MinFreeSpacePercent float32
@@ -32,7 +33,7 @@ type DiskLocation struct {
isDiskSpaceLow bool
}
-func NewDiskLocation(dir string, maxVolumeCount int, minFreeSpacePercent float32, idxDir string) *DiskLocation {
+func NewDiskLocation(dir string, maxVolumeCount int, minFreeSpacePercent float32, idxDir string, volumeType VolumeType) *DiskLocation {
dir = util.ResolvePath(dir)
if idxDir == "" {
idxDir = dir
@@ -42,6 +43,7 @@ func NewDiskLocation(dir string, maxVolumeCount int, minFreeSpacePercent float32
location := &DiskLocation{
Directory: dir,
IdxDirectory: idxDir,
+ VolumeType: volumeType,
MaxVolumeCount: maxVolumeCount,
OriginalMaxVolumeCount: maxVolumeCount,
MinFreeSpacePercent: minFreeSpacePercent,