|
|
@ -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 VolumeId |
|
|
|
dir string |
|
|
|