summaryrefslogtreecommitdiff
path: root/pkg/spec/spec.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-04-03 19:49:09 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-04-04 12:27:20 -0400
commit1fdc89f616fead07b9b49e949f7c7cebba951070 (patch)
tree533be88fa82f9dd57409428c8ef41f24acd78a8e /pkg/spec/spec.go
parent42c95eed2cedc1769987984a073e2ec71970e123 (diff)
downloadpodman-1fdc89f616fead07b9b49e949f7c7cebba951070.tar.gz
podman-1fdc89f616fead07b9b49e949f7c7cebba951070.tar.bz2
podman-1fdc89f616fead07b9b49e949f7c7cebba951070.zip
Drop LocalVolumes from our the database
We were never using it. It's actually a potentially quite sizable field (very expensive to decode an array of structs!). Removing it should do no harm. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'pkg/spec/spec.go')
-rw-r--r--pkg/spec/spec.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go
index 53aad21d7..9b6bd089e 100644
--- a/pkg/spec/spec.go
+++ b/pkg/spec/spec.go
@@ -20,7 +20,6 @@ import (
)
const cpuPeriod = 100000
-const bindMount = "bind"
func supercedeUserMounts(mounts []spec.Mount, configMount []spec.Mount) []spec.Mount {
if len(mounts) > 0 {
@@ -56,7 +55,7 @@ func splitNamedVolumes(mounts []spec.Mount) ([]spec.Mount, []*libpod.ContainerNa
namedVolumes := make([]*libpod.ContainerNamedVolume, 0)
for _, mount := range mounts {
// If it's not a named volume, append unconditionally
- if mount.Type != bindMount {
+ if mount.Type != TypeBind {
newMounts = append(newMounts, mount)
continue
}
@@ -128,7 +127,7 @@ func CreateConfigToOCISpec(config *CreateConfig) (*spec.Spec, error) { //nolint
}
sysMnt := spec.Mount{
Destination: "/sys",
- Type: bindMount,
+ Type: TypeBind,
Source: "/sys",
Options: []string{"rprivate", "nosuid", "noexec", "nodev", r, "rbind"},
}
@@ -155,7 +154,7 @@ func CreateConfigToOCISpec(config *CreateConfig) (*spec.Spec, error) { //nolint
g.RemoveMount("/dev/mqueue")
devMqueue := spec.Mount{
Destination: "/dev/mqueue",
- Type: bindMount,
+ Type: TypeBind,
Source: "/dev/mqueue",
Options: []string{"bind", "nosuid", "noexec", "nodev"},
}
@@ -165,7 +164,7 @@ func CreateConfigToOCISpec(config *CreateConfig) (*spec.Spec, error) { //nolint
g.RemoveMount("/proc")
procMount := spec.Mount{
Destination: "/proc",
- Type: bindMount,
+ Type: TypeBind,
Source: "/proc",
Options: []string{"rbind", "nosuid", "noexec", "nodev"},
}