add back previous chunk upload selection algo

This commit is contained in:
chrislu
2023-01-03 22:50:39 -08:00
parent 7bdae5172e
commit 5423790b2c
4 changed files with 35 additions and 5 deletions

View File

@@ -161,6 +161,12 @@ func (sc *SwapFileChunk) ActivityScore() int64 {
return sc.activityScore.ActivityScore()
}
func (sc *SwapFileChunk) WrittenSize() int64 {
sc.RLock()
defer sc.RUnlock()
return sc.usage.WrittenSize()
}
func (sc *SwapFileChunk) SaveContent(saveFn SaveToStorageFunc) {
sc.RLock()
defer sc.RUnlock()