simplified to one machine per volume

git-svn-id: https://weed-fs.googlecode.com/svn/trunk@14 282b0af5-e82d-9cf1-ede4-77906d7719d0
This commit is contained in:
chris.lu@gmail.com committed 2011-12-18 07:22:04 +00:00
1 parent 1fed603df9
commit 2c7a4eea1f
5 files changed
+104 -81

No files matched your search

+3 -3
View File
@@ -38,12 +38,12 @@ func NewVolume(dirname string, id uint64) (v *Volume) {
return
}
func (v *Volume) CanWrite(limit int64) bool {
func (v *Volume) Size() int64 {
stat, e:=v.dataFile.Stat()
if e!=nil{
return stat.Size < limit
return stat.Size
}
return false
return -1
}
func (v *Volume) Close() {
close(v.accessChannel)