mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
avoid Access() calls on known bucket paths (#17719)
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"path/filepath"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@@ -97,6 +98,12 @@ func bgFormatErasureCleanupTmp(diskPath string) {
|
||||
err))
|
||||
}
|
||||
|
||||
// Delete all temporary files created for DirectIO write check
|
||||
files, _ := filepath.Glob(filepath.Join(diskPath, ".writable-check-*.tmp"))
|
||||
for _, file := range files {
|
||||
removeAll(file)
|
||||
}
|
||||
|
||||
// Remove the entire folder in case there are leftovers that didn't get cleaned up before restart.
|
||||
go removeAll(pathJoin(diskPath, minioMetaTmpBucket+"-old"))
|
||||
// Renames and schedules for purging all bucket metacache.
|
||||
|
||||
Reference in New Issue
Block a user