mirror of
https://github.com/minio/minio.git
synced 2025-02-04 02:15:59 -05:00
Re-add Veeam Listing workaround (#16593)
This commit is contained in:
parent
d65debb6bc
commit
d0f4cc89a5
@ -1207,6 +1207,7 @@ func (z *erasureServerPools) ListObjectVersions(ctx context.Context, bucket, pre
|
|||||||
if marker == "" && versionMarker != "" {
|
if marker == "" && versionMarker != "" {
|
||||||
return loi, NotImplemented{}
|
return loi, NotImplemented{}
|
||||||
}
|
}
|
||||||
|
|
||||||
opts := listPathOptions{
|
opts := listPathOptions{
|
||||||
Bucket: bucket,
|
Bucket: bucket,
|
||||||
Prefix: prefix,
|
Prefix: prefix,
|
||||||
@ -1217,6 +1218,17 @@ func (z *erasureServerPools) ListObjectVersions(ctx context.Context, bucket, pre
|
|||||||
AskDisks: globalAPIConfig.getListQuorum(),
|
AskDisks: globalAPIConfig.getListQuorum(),
|
||||||
Versioned: true,
|
Versioned: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
ri := logger.GetReqInfo(ctx)
|
||||||
|
if ri != nil && strings.Contains(ri.UserAgent, `1.0 Veeam/1.0 Backup`) && strings.HasSuffix(prefix, ".blk") {
|
||||||
|
opts.BaseDir = prefix
|
||||||
|
opts.Transient = true
|
||||||
|
}
|
||||||
|
|
||||||
// set bucket metadata in opts
|
// set bucket metadata in opts
|
||||||
opts.setBucketMeta(ctx)
|
opts.setBucketMeta(ctx)
|
||||||
|
|
||||||
|
@ -96,7 +96,9 @@ func (z *erasureServerPools) listPath(ctx context.Context, o *listPathOptions) (
|
|||||||
|
|
||||||
// Decode and get the optional list id from the marker.
|
// Decode and get the optional list id from the marker.
|
||||||
o.parseMarker()
|
o.parseMarker()
|
||||||
o.BaseDir = baseDirFromPrefix(o.Prefix)
|
if o.BaseDir == "" {
|
||||||
|
o.BaseDir = baseDirFromPrefix(o.Prefix)
|
||||||
|
}
|
||||||
o.Transient = o.Transient || isReservedOrInvalidBucket(o.Bucket, false)
|
o.Transient = o.Transient || isReservedOrInvalidBucket(o.Bucket, false)
|
||||||
o.SetFilter()
|
o.SetFilter()
|
||||||
if o.Transient {
|
if o.Transient {
|
||||||
|
@ -49,6 +49,7 @@ type listPathOptions struct {
|
|||||||
Bucket string
|
Bucket string
|
||||||
|
|
||||||
// Directory inside the bucket.
|
// Directory inside the bucket.
|
||||||
|
// When unset listPath will set this based on Prefix
|
||||||
BaseDir string
|
BaseDir string
|
||||||
|
|
||||||
// Scan/return only content with prefix.
|
// Scan/return only content with prefix.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user