mirror of
https://github.com/minio/minio.git
synced 2025-11-06 20:33:07 -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:
18
cmd/xl-v1.go
18
cmd/xl-v1.go
@@ -76,6 +76,24 @@ type xlObjects struct {
|
||||
// list of all errors that can be ignored in tree walk operation in XL
|
||||
var xlTreeWalkIgnoredErrs = append(baseIgnoredErrs, errDiskAccessDenied, errVolumeNotFound, errFileNotFound)
|
||||
|
||||
// newXLObjectLayer - initialize any object layer depending on the number of disks.
|
||||
func newXLObjectLayer(storageDisks []StorageAPI) (ObjectLayer, error) {
|
||||
// Initialize XL object layer.
|
||||
objAPI, err := newXLObjects(storageDisks)
|
||||
fatalIf(err, "Unable to initialize XL object layer.")
|
||||
|
||||
// Initialize and load bucket policies.
|
||||
err = initBucketPolicies(objAPI)
|
||||
fatalIf(err, "Unable to load all bucket policies.")
|
||||
|
||||
// Initialize a new event notifier.
|
||||
err = initEventNotifier(objAPI)
|
||||
fatalIf(err, "Unable to initialize event notification.")
|
||||
|
||||
// Success.
|
||||
return objAPI, nil
|
||||
}
|
||||
|
||||
// newXLObjects - initialize new xl object layer.
|
||||
func newXLObjects(storageDisks []StorageAPI) (ObjectLayer, error) {
|
||||
if storageDisks == nil {
|
||||
|
||||
Reference in New Issue
Block a user