mirror of
https://github.com/minio/minio.git
synced 2025-11-10 22:10:12 -05:00
fs: Add safe locking semantics for format.json (#4523)
This patch also reverts previous changes which were merged for migration to the newer disk format. We will be bringing these changes in subsequent releases. But we wish to add protection in this release such that future release migrations are protected. Revert "fs: Migration should handle bucketConfigs as regular objects. (#4482)" This reverts commit976870a391. Revert "fs: Migrate object metadata to objects directory. (#4195)" This reverts commit76f4f20609.
This commit is contained in:
@@ -19,10 +19,16 @@
|
||||
package lock
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"os"
|
||||
"sync"
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrAlreadyLocked is returned if the underlying fd is already locked.
|
||||
ErrAlreadyLocked = errors.New("file already locked")
|
||||
)
|
||||
|
||||
// RLockedFile represents a read locked file, implements a special
|
||||
// closer which only closes the associated *os.File when the ref count.
|
||||
// has reached zero, i.e when all the readers have given up their locks.
|
||||
|
||||
Reference in New Issue
Block a user