aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/volume.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-12-13 23:08:21 -0800
committerChris Lu <chris.lu@gmail.com>2020-12-13 23:08:21 -0800
commit94525aa0fdb8ecbb3f2adf1d9a04bb1572540700 (patch)
tree0ae1e23e33c80c16806a1c4e8a06548c99b0fb83 /weed/storage/volume.go
parentf6a419c26caf6356df1a099c5a900b158807b5a4 (diff)
downloadseaweedfs-94525aa0fdb8ecbb3f2adf1d9a04bb1572540700.tar.xz
seaweedfs-94525aa0fdb8ecbb3f2adf1d9a04bb1572540700.zip
allocate volume by disk type
Diffstat (limited to 'weed/storage/volume.go')
-rw-r--r--weed/storage/volume.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/weed/storage/volume.go b/weed/storage/volume.go
index ebc1bff3e..1905a85a5 100644
--- a/weed/storage/volume.go
+++ b/weed/storage/volume.go
@@ -171,6 +171,10 @@ func (v *Volume) IndexFileSize() uint64 {
return v.nm.IndexFileSize()
}
+func (v *Volume) DiskType() DiskType {
+ return v.location.DiskType
+}
+
// Close cleanly shuts down this volume
func (v *Volume) Close() {
v.dataFileAccessLock.Lock()
@@ -262,7 +266,7 @@ func (v *Volume) ToVolumeInformationMessage() (types.NeedleId, *master_pb.Volume
Ttl: v.Ttl.ToUint32(),
CompactRevision: uint32(v.SuperBlock.CompactionRevision),
ModifiedAtSecond: modTime.Unix(),
- DiskType: string(v.location.DiskType),
+ DiskType: string(v.location.DiskType),
}
volumeInfo.RemoteStorageName, volumeInfo.RemoteStorageKey = v.RemoteStorageNameKey()