This removes the out of disk space check from CheckHealth. The disk space is now only checked if there are files to pull, in which case pulling those files is stopped, but everything else (dirs, links, deletes) keeps running -> can recover disk space through pulling.
This commit is contained in:
@@ -282,8 +282,19 @@ func (l FolderDeviceConfigurationList) Len() int {
|
||||
return len(l)
|
||||
}
|
||||
|
||||
func (f *FolderConfiguration) CheckFreeSpace() error {
|
||||
return checkFreeSpace(f.MinDiskFree, f.Filesystem())
|
||||
func (f *FolderConfiguration) CheckAvailableSpace(req int64) error {
|
||||
fs := f.Filesystem()
|
||||
usage, err := fs.Usage(".")
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
usage.Free -= req
|
||||
if usage.Free > 0 {
|
||||
if err := checkFreeSpace(f.MinDiskFree, usage); err == nil {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
return fmt.Errorf("insufficient space in %v %v", fs.Type(), fs.URI())
|
||||
}
|
||||
|
||||
type FolderConfigurationList []FolderConfiguration
|
||||
|
||||
Reference in New Issue
Block a user