cleanly destroy remote files

This commit is contained in:
Chris Lu
2019-12-25 16:17:58 -08:00
parent eecad6062a
commit 35393b4a02
3 changed files with 17 additions and 0 deletions

View File

@@ -66,6 +66,14 @@ func (v *Volume) maybeLoadVolumeTierInfo() bool {
return true
}
func (v *Volume) HasRemoteFile() bool {
if v.DataBackend == nil {
return false
}
_, ok := v.DataBackend.(*backend.DiskFile)
return !ok
}
func (v *Volume) LoadRemoteFile() error {
tierFile := v.volumeTierInfo.GetFiles()[0]
backendStorage := backend.BackendStorages[tierFile.BackendName()]