aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/volume_super_block.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2018-06-24 15:37:54 -0700
committerChris Lu <chris.lu@gmail.com>2018-06-24 15:37:54 -0700
commit49f421628088bcf2d039a63803cfafb54562b5ce (patch)
tree9e6d1d2da35ed2416eb857a9e5b76941971e310e /weed/storage/volume_super_block.go
parent7f6500ae079cef53d8dbc4067d7e468555182514 (diff)
downloadseaweedfs-49f421628088bcf2d039a63803cfafb54562b5ce.tar.xz
seaweedfs-49f421628088bcf2d039a63803cfafb54562b5ce.zip
fix compilation error
Diffstat (limited to 'weed/storage/volume_super_block.go')
-rw-r--r--weed/storage/volume_super_block.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/storage/volume_super_block.go b/weed/storage/volume_super_block.go
index 3c1cf25d8..09b4fbe83 100644
--- a/weed/storage/volume_super_block.go
+++ b/weed/storage/volume_super_block.go
@@ -32,7 +32,7 @@ type SuperBlock struct {
}
func (s *SuperBlock) BlockSize() int {
- switch version {
+ switch s.version {
case Version2:
return _SuperBlockSize + int(s.extraSize)
}
@@ -120,7 +120,7 @@ func ReadSuperBlock(dataFile *os.File) (superBlock SuperBlock, err error) {
superBlock.Extra = &master_pb.SuperBlockExtra{}
err = proto.Unmarshal(extraData, superBlock.Extra)
if err != nil {
- err = fmt.Errorf("cannot read volume %s super block extra: %v", dataFile.Name(), e)
+ err = fmt.Errorf("cannot read volume %s super block extra: %v", dataFile.Name(), err)
return
}
}