Browse Source

adjust formatting

pull/2/head
Chris Lu 12 years ago
parent
commit
e00d8dc536
  1. 8
      weed-fs/src/pkg/storage/volume.go

8
weed-fs/src/pkg/storage/volume.go

@ -73,8 +73,8 @@ func (v *Volume) readSuperBlock() {
v.replicaType, _ = NewReplicationTypeFromByte(header[1])
}
}
func (v *Volume) NeedToReplicate() bool{
return v.replicaType.GetCopyCount()>1
func (v *Volume) NeedToReplicate() bool {
return v.replicaType.GetCopyCount() > 1
}
func (v *Volume) write(n *Needle) uint32 {
@ -172,12 +172,12 @@ func (v *Volume) copyDataAndGenerateIndexFile(srcName, dstName, idxName string)
n.Data = bytes[:n.Size]
n.Checksum = NewCRC(n.Data)
n.Append(dst)
new_offset += rest+16
new_offset += rest + 16
log.Println("saving key", n.Id, "volume offset", old_offset, "=>", new_offset, "data_size", n.Size, "rest", rest)
}
src.Seek(int64(rest-n.Size-4), 1)
}
old_offset += rest+16
old_offset += rest + 16
n, rest = ReadNeedle(src)
}

Loading…
Cancel
Save