mirror of
https://github.com/containers/podman.git
synced 2025-12-01 10:38:05 +08:00
Vendor in latest c/common
Pull in updates made to the filters code for images. Filters now perform an AND operation except for th reference filter which does an OR operation for positive case but an AND operation for negative cases. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
This commit is contained in:
20
vendor/github.com/containers/common/pkg/cgroups/cgroups_linux.go
generated
vendored
20
vendor/github.com/containers/common/pkg/cgroups/cgroups_linux.go
generated
vendored
@@ -1,5 +1,4 @@
|
||||
//go:build linux
|
||||
// +build linux
|
||||
|
||||
package cgroups
|
||||
|
||||
@@ -22,6 +21,7 @@ import (
|
||||
"github.com/opencontainers/runc/libcontainer/cgroups/fs2"
|
||||
"github.com/opencontainers/runc/libcontainer/configs"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/exp/maps"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -73,12 +73,13 @@ const (
|
||||
var handlers map[string]controllerHandler
|
||||
|
||||
func init() {
|
||||
handlers = make(map[string]controllerHandler)
|
||||
handlers[CPU] = getCPUHandler()
|
||||
handlers[CPUset] = getCpusetHandler()
|
||||
handlers[Memory] = getMemoryHandler()
|
||||
handlers[Pids] = getPidsHandler()
|
||||
handlers[Blkio] = getBlkioHandler()
|
||||
handlers = map[string]controllerHandler{
|
||||
CPU: getCPUHandler(),
|
||||
CPUset: getCpusetHandler(),
|
||||
Memory: getMemoryHandler(),
|
||||
Pids: getPidsHandler(),
|
||||
Blkio: getBlkioHandler(),
|
||||
}
|
||||
}
|
||||
|
||||
// getAvailableControllers get the available controllers
|
||||
@@ -492,10 +493,7 @@ func (c *CgroupControl) AddPid(pid int) error {
|
||||
return fs2.CreateCgroupPath(path, c.config)
|
||||
}
|
||||
|
||||
names := make([]string, 0, len(handlers))
|
||||
for n := range handlers {
|
||||
names = append(names, n)
|
||||
}
|
||||
names := maps.Keys(handlers)
|
||||
|
||||
for _, c := range c.additionalControllers {
|
||||
if !c.symlink {
|
||||
|
||||
Reference in New Issue
Block a user