add a command to force compaction of a volume, removing deleted files

This commit is contained in:
Chris Lu
2013-09-28 22:18:52 -07:00
parent 738e528329
commit 3f5f8657d2
4 changed files with 47 additions and 2 deletions

View File

@@ -256,7 +256,7 @@ func (v *Volume) garbageLevel() float64 {
return float64(v.nm.DeletedSize()) / float64(v.ContentSize())
}
func (v *Volume) compact() error {
func (v *Volume) Compact() error {
v.accessLock.Lock()
defer v.accessLock.Unlock()