This commit is contained in:
Chris Lu
2020-06-05 15:27:10 -07:00
parent 03c2f03509
commit 45a9d852d3
11 changed files with 25 additions and 24 deletions

View File

@@ -1,13 +1,13 @@
package storage
import (
"fmt"
"fmt"
"github.com/chrislusf/seaweedfs/weed/stats"
"io/ioutil"
"os"
"io/ioutil"
"os"
"path/filepath"
"strings"
"sync"
"strings"
"sync"
"time"
"github.com/chrislusf/seaweedfs/weed/glog"
@@ -16,11 +16,11 @@ import (
)
type DiskLocation struct {
Directory string
MaxVolumeCount int
Directory string
MaxVolumeCount int
MinFreeSpacePercent float32
volumes map[needle.VolumeId]*Volume
volumesLock sync.RWMutex
volumes map[needle.VolumeId]*Volume
volumesLock sync.RWMutex
// erasure coding
ecVolumes map[needle.VolumeId]*erasure_coding.EcVolume
@@ -315,4 +315,4 @@ func (l *DiskLocation) CheckDiskSpace() {
}
}
}
}

View File

@@ -11,7 +11,7 @@ type OffsetHigher struct {
}
const (
OffsetSize = 4
OffsetSize = 4
MaxPossibleVolumeSize uint64 = 4 * 1024 * 1024 * 1024 * 8 // 32GB
)

View File

@@ -11,7 +11,7 @@ type OffsetHigher struct {
}
const (
OffsetSize = 4 + 1
OffsetSize = 4 + 1
MaxPossibleVolumeSize uint64 = 4 * 1024 * 1024 * 1024 * 8 * 256 /* 256 is from the extra byte */ // 8TB
)