aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/erasure_coding/ec_volume_info.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/storage/erasure_coding/ec_volume_info.go')
-rw-r--r--weed/storage/erasure_coding/ec_volume_info.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/weed/storage/erasure_coding/ec_volume_info.go b/weed/storage/erasure_coding/ec_volume_info.go
index f464a6d3d..787910b0c 100644
--- a/weed/storage/erasure_coding/ec_volume_info.go
+++ b/weed/storage/erasure_coding/ec_volume_info.go
@@ -11,15 +11,17 @@ type EcVolumeInfo struct {
Collection string
ShardBits ShardBits
DiskType string
- ExpireAtSec uint64 //ec volume destroy time, calculated from the ec volume was created
+ DiskId uint32 // ID of the disk this EC volume is on
+ ExpireAtSec uint64 // ec volume destroy time, calculated from the ec volume was created
}
-func NewEcVolumeInfo(diskType string, collection string, vid needle.VolumeId, shardBits ShardBits, expireAtSec uint64) *EcVolumeInfo {
+func NewEcVolumeInfo(diskType string, collection string, vid needle.VolumeId, shardBits ShardBits, expireAtSec uint64, diskId uint32) *EcVolumeInfo {
return &EcVolumeInfo{
Collection: collection,
VolumeId: vid,
ShardBits: shardBits,
DiskType: diskType,
+ DiskId: diskId,
ExpireAtSec: expireAtSec,
}
}
@@ -62,6 +64,7 @@ func (ecInfo *EcVolumeInfo) ToVolumeEcShardInformationMessage() (ret *master_pb.
Collection: ecInfo.Collection,
DiskType: ecInfo.DiskType,
ExpireAtSec: ecInfo.ExpireAtSec,
+ DiskId: ecInfo.DiskId,
}
}