//
// SPDX-License-Identifier: AGPL-3.0
-package main
+package keepstore
import (
"time"
)
-// A Keep "block" is 64MB.
+// BlockSize for a Keep "block" is 64MB.
const BlockSize = 64 * 1024 * 1024
-// A Keep volume must have at least MinFreeKilobytes available
+// MinFreeKilobytes is the amount of space a Keep volume must have available
// in order to permit writes.
const MinFreeKilobytes = BlockSize / 1024
var bufs *bufferPool
-// KeepError types.
-//
type KeepError struct {
HTTPCode int
ErrMsg string
func emptyTrash(mounts []*VolumeMount, interval time.Duration) {
for range time.NewTicker(interval).C {
for _, v := range mounts {
- v.EmptyTrash()
+ if v.KeepMount.AllowTrash {
+ v.EmptyTrash()
+ }
}
}
}