mirror of
https://github.com/minio/minio.git
synced 2025-11-10 05:59:43 -05:00
fs: Re-implement object layer to remember the fd (#3509)
This patch re-writes FS backend to support shared backend sharing locks for safe concurrent access across multiple servers.
This commit is contained in:
@@ -48,6 +48,12 @@ func init() {
|
||||
globalObjLayerMutex = &sync.Mutex{}
|
||||
}
|
||||
|
||||
// Check if the disk is remote.
|
||||
func isRemoteDisk(disk StorageAPI) bool {
|
||||
_, ok := disk.(*networkStorage)
|
||||
return ok
|
||||
}
|
||||
|
||||
// House keeping code for FS/XL and distributed Minio setup.
|
||||
func houseKeeping(storageDisks []StorageAPI) error {
|
||||
var wg = &sync.WaitGroup{}
|
||||
@@ -60,8 +66,8 @@ func houseKeeping(storageDisks []StorageAPI) error {
|
||||
if disk == nil {
|
||||
continue
|
||||
}
|
||||
if _, ok := disk.(*networkStorage); ok {
|
||||
// Skip remote disks.
|
||||
// Skip remote disks.
|
||||
if isRemoteDisk(disk) {
|
||||
continue
|
||||
}
|
||||
wg.Add(1)
|
||||
|
||||
Reference in New Issue
Block a user