SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
simplify volume.go file
Chris Lu9b4ce6588260
diff --git a/weed-fs/src/pkg/storage/volume.go b/weed-fs/src/pkg/storage/volume.goindex 519ebab4d9..a77cdd07c0 100644--- a/weed-fs/src/pkg/storage/volume.go+++ b/weed-fs/src/pkg/storage/volume.go@@ -5,7 +5,6 @@ import ("log""os""path"- "strconv""sync")@@ -13,18 +12,6 @@ const (SuperBlockSize = 8)-type VolumeId uint32-type VolumeInfo struct {- Id VolumeId- Size int64-}-func NewVolumeId(vid string) (VolumeId,error) {- volumeId, err := strconv.ParseUint(vid, 10, 64)- return VolumeId(volumeId), err-}-func (vid *VolumeId) String() string{- return strconv.FormatUint(uint64(*vid), 10)-}type Volume struct {Id VolumeIddir stringdiff --git a/weed-fs/src/pkg/storage/volume_id.go b/weed-fs/src/pkg/storage/volume_id.gonew file mode 100644index 0000000000..952663a815--- /dev/null+++ b/weed-fs/src/pkg/storage/volume_id.go@@ -0,0 +1,14 @@+package storage++import (+ "strconv"+)++type VolumeId uint32+func NewVolumeId(vid string) (VolumeId,error) {+ volumeId, err := strconv.ParseUint(vid, 10, 64)+ return VolumeId(volumeId), err+}+func (vid *VolumeId) String() string{+ return strconv.FormatUint(uint64(*vid), 10)+}diff --git a/weed-fs/src/pkg/storage/volume_info.go b/weed-fs/src/pkg/storage/volume_info.gonew file mode 100644index 0000000000..cc2cccdca4--- /dev/null+++ b/weed-fs/src/pkg/storage/volume_info.go@@ -0,0 +1,10 @@+package storage++import (++)++type VolumeInfo struct {+ Id VolumeId+ Size int64+}