listobjectversions: Add shortcut for Veeam blocks (#10893)

Add shortcut for `APN/1.0 Veeam/1.0 Backup/10.0`

It requests unique blocks with a specific prefix. We skip 
scanning the parent directory for more objects matching the prefix.
This commit is contained in:
Klaus Post
2020-11-13 16:58:20 -08:00
committed by GitHub
parent 17a5ff51ff
commit b5a3d79bce
4 changed files with 34 additions and 7 deletions
+4
View File
@@ -83,6 +83,10 @@ func (z *erasureServerSets) listPath(ctx context.Context, o listPathOptions) (en
o.ID = mustGetUUID()
}
o.BaseDir = baseDirFromPrefix(o.Prefix)
if o.singleObject {
// Override for single object.
o.BaseDir = o.Prefix
}
var cache metacache
// If we don't have a list id we must ask the server if it has a cache or create a new.