mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-21 04:37:58 +08:00
fix pre allocated volume size
This commit is contained in:
@@ -24,7 +24,7 @@ func NewOnDiskCacheLayer(dir, namePrefix string, diskSize int64, segmentCount in
|
|||||||
c := &OnDiskCacheLayer{}
|
c := &OnDiskCacheLayer{}
|
||||||
for i := 0; i < volumeCount; i++ {
|
for i := 0; i < volumeCount; i++ {
|
||||||
fileName := path.Join(dir, fmt.Sprintf("%s_%d", namePrefix, i))
|
fileName := path.Join(dir, fmt.Sprintf("%s_%d", namePrefix, i))
|
||||||
diskCache, err := LoadOrCreateChunkCacheVolume(fileName, volumeSize*1024*1024)
|
diskCache, err := LoadOrCreateChunkCacheVolume(fileName, volumeSize)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Errorf("failed to add cache %s : %v", fileName, err)
|
glog.Errorf("failed to add cache %s : %v", fileName, err)
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user