repair the error replications of the volume

This commit is contained in:
stlpmo-jn
2019-04-10 19:41:55 +08:00
parent 7d8ce080bd
commit c1a0403da2
5 changed files with 380 additions and 11 deletions

View File

@@ -79,6 +79,25 @@ func (v *Volume) Size() int64 {
return 0 // -1 causes integer overflow and the volume to become unwritable.
}
func (v *Volume)IndexFileSize() uint64 {
return v.nm.IndexFileSize()
}
func (v *Volume)DataFileSize() uint64 {
return uint64(v.Size())
}
/**
unix time in seconds
*/
func (v *Volume)LastModifiedTime() uint64 {
return v.lastModifiedTime
}
func (v *Volume)FileCount() uint {
return uint(v.nm.FileCount())
}
// Close cleanly shuts down this volume
func (v *Volume) Close() {
v.dataFileAccessLock.Lock()