mirror of
https://github.com/containers/podman.git
synced 2025-12-14 11:00:10 +08:00
Update vendor of container/storage
Lots of fixes for issues found by podman. overlay: propagate errors from mountProgram utils: root in a userns uses global conf file Fix handling of additional stores Correctly check permissions on rootless directory Fix possible integer overflow on 32bit builds Evaluate device path for lvm lockfile test: make concurrent RW test determinisitc lockfile test: make concurrent read tests deterministic Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
15
vendor/github.com/containers/storage/lockfile.go
generated
vendored
15
vendor/github.com/containers/storage/lockfile.go
generated
vendored
@@ -58,8 +58,17 @@ func GetROLockfile(path string) (Locker, error) {
|
||||
return getLockfile(path, true)
|
||||
}
|
||||
|
||||
// getLockfile is a helper for GetLockfile and GetROLockfile and returns Locker
|
||||
// based on the path and read-only property.
|
||||
// getLockfile returns a Locker object, possibly (depending on the platform)
|
||||
// working inter-process, and associated with the specified path.
|
||||
//
|
||||
// If ro, the lock is a read-write lock and the returned Locker should correspond to the
|
||||
// “lock for reading” (shared) operation; otherwise, the lock is either an exclusive lock,
|
||||
// or a read-write lock and Locker should correspond to the “lock for writing” (exclusive) operation.
|
||||
//
|
||||
// WARNING:
|
||||
// - The lock may or MAY NOT be inter-process.
|
||||
// - There may or MAY NOT be an actual object on the filesystem created for the specified path.
|
||||
// - Even if ro, the lock MAY be exclusive.
|
||||
func getLockfile(path string, ro bool) (Locker, error) {
|
||||
lockfilesLock.Lock()
|
||||
defer lockfilesLock.Unlock()
|
||||
@@ -79,7 +88,7 @@ func getLockfile(path string, ro bool) (Locker, error) {
|
||||
}
|
||||
return locker, nil
|
||||
}
|
||||
locker, err := getLockFile(path, ro) // platform dependent locker
|
||||
locker, err := createLockerForPath(path, ro) // platform-dependent locker
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user