mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
remove all older unused APIs (#18769)
This commit is contained in:
@@ -213,6 +213,21 @@ func newLocalXLStorage(path string) (*xlStorage, error) {
|
||||
}, true)
|
||||
}
|
||||
|
||||
// Make Erasure backend meta volumes.
|
||||
func makeFormatErasureMetaVolumes(disk StorageAPI) error {
|
||||
if disk == nil {
|
||||
return errDiskNotFound
|
||||
}
|
||||
volumes := []string{
|
||||
minioMetaTmpDeletedBucket, // creates .minio.sys/tmp as well as .minio.sys/tmp/.trash
|
||||
minioMetaMultipartBucket, // creates .minio.sys/multipart
|
||||
dataUsageBucket, // creates .minio.sys/buckets
|
||||
minioConfigBucket, // creates .minio.sys/config
|
||||
}
|
||||
// Attempt to create MinIO internal buckets.
|
||||
return disk.MakeVolBulk(context.TODO(), volumes...)
|
||||
}
|
||||
|
||||
// Initialize a new storage disk.
|
||||
func newXLStorage(ep Endpoint, cleanUp bool) (s *xlStorage, err error) {
|
||||
path := ep.Path
|
||||
@@ -279,12 +294,12 @@ func newXLStorage(ep Endpoint, cleanUp bool) (s *xlStorage, err error) {
|
||||
s.formatFileInfo = formatFi
|
||||
s.formatFile = pathJoin(s.drivePath, minioMetaBucket, formatConfigFile)
|
||||
|
||||
if len(s.formatData) == 0 {
|
||||
// Create all necessary bucket folders if possible.
|
||||
if err = makeFormatErasureMetaVolumes(s); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
} else {
|
||||
// Create all necessary bucket folders if possible.
|
||||
if err = makeFormatErasureMetaVolumes(s); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(s.formatData) > 0 {
|
||||
format := &formatErasureV3{}
|
||||
json := jsoniter.ConfigCompatibleWithStandardLibrary
|
||||
if err = json.Unmarshal(s.formatData, &format); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user