diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-03-22 16:21:42 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-03-22 16:21:42 -0700 |
| commit | 3137777d8395111f6c1eb4b3653e13f4961b8510 (patch) | |
| tree | 14cfd08d09cd27c5886dd053a9af62b74f1188c5 /weed/storage/erasure_coding/ec_volume.go | |
| parent | 0bf148f49d63a834000f7bce63df2c0f4d78fa19 (diff) | |
| download | seaweedfs-3137777d8395111f6c1eb4b3653e13f4961b8510.tar.xz seaweedfs-3137777d8395111f6c1eb4b3653e13f4961b8510.zip | |
volume: automatically detect max volume count
Diffstat (limited to 'weed/storage/erasure_coding/ec_volume.go')
| -rw-r--r-- | weed/storage/erasure_coding/ec_volume.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/weed/storage/erasure_coding/ec_volume.go b/weed/storage/erasure_coding/ec_volume.go index 3d9aa2cff..eef53765f 100644 --- a/weed/storage/erasure_coding/ec_volume.go +++ b/weed/storage/erasure_coding/ec_volume.go @@ -152,6 +152,13 @@ func (ev *EcVolume) ShardSize() int64 { return 0 } +func (ev *EcVolume) Size() (size int64) { + for _, shard := range ev.Shards { + size += shard.Size() + } + return +} + func (ev *EcVolume) CreatedAt() time.Time { return ev.ecxCreatedAt } |
