mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-23 22:40:39 +02:00
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:
1 parent
1fed603df9
commit
2c7a4eea1f
5 files changed
+104
-81
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user