mirror of
https://github.com/containers/podman.git
synced 2025-10-18 03:33:32 +08:00
Add number of free locks to podman info
This is a nice quality-of-life change that should help to debug situations where someone runs out of locks (usually when a bunch of unused volumes accumulate). Signed-off-by: Matt Heon <mheon@redhat.com>
This commit is contained in:
@ -98,6 +98,16 @@ func (m *SHMLockManager) FreeAllLocks() error {
|
||||
return m.locks.DeallocateAllSemaphores()
|
||||
}
|
||||
|
||||
// AvailableLocks returns the number of free locks in the manager.
|
||||
func (m *SHMLockManager) AvailableLocks() (*uint32, error) {
|
||||
avail, err := m.locks.GetFreeLocks()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &avail, nil
|
||||
}
|
||||
|
||||
// SHMLock is an individual shared memory lock.
|
||||
type SHMLock struct {
|
||||
lockID uint32
|
||||
|
Reference in New Issue
Block a user