mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
super block reserves a couple of bits for future extension
This commit is contained in:
parent
f339e9c284
commit
7f6500ae07
|
@ -55,8 +55,9 @@ func (s *SuperBlock) Bytes() []byte {
|
|||
glog.Fatalf("cannot marshal super block extra %+v: %v", s.Extra, err)
|
||||
}
|
||||
extraSize := len(extraData)
|
||||
if extraSize > 256*256 {
|
||||
glog.Fatalf("super block extra size is %d bigger than %d: %v", extraSize, 256*256)
|
||||
if extraSize > 256*256-2 {
|
||||
// reserve a couple of bits for future extension
|
||||
glog.Fatalf("super block extra size is %d bigger than %d: %v", extraSize, 256*256-2)
|
||||
}
|
||||
s.extraSize = uint16(extraSize)
|
||||
util.Uint16toBytes(header[6:8], s.extraSize)
|
||||
|
|
Loading…
Reference in a new issue