filesystem

package
v0.9.238 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2025 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMaskedPathsForDump

func AddMaskedPathsForDump(next types.Dump) types.Dump

func AddMaskedPathsForRestore

func AddMaskedPathsForRestore(next types.Restore) types.Restore

func AddMountsForDump

func AddMountsForDump(next types.Dump) types.Dump

func AddMountsForRestore

func AddMountsForRestore(next types.Restore) types.Restore

func GetCgroupMounts

func GetCgroupMounts(m *configs.Mount) ([]*configs.Mount, error)

lifted from libcontainer

func IsPathInPrefixList

func IsPathInPrefixList(path string, prefix []string) bool

IsPathInPrefixList is a small function for CRIU restore to make sure mountpoints, which are on a tmpfs, are not created in the roofs.

func MountRootDirForRestore

func MountRootDirForRestore(next types.Restore) types.Restore

CRIU has a few requirements for a root directory: * it must be a mount point * its parent must not be overmounted c.config.Rootfs is bind-mounted to a temporary directory to satisfy these requirements.

func SecureJoin added in v0.9.238

func SecureJoin(rootfs, path string) string

Ensures the path is within the rootfs and returns the path relative to the rootfs

func SetupMountsForRestore

func SetupMountsForRestore(next types.Restore) types.Restore

Tries to set up the rootfs of the container to be restored in the same way runc does it for initial container creation. Even for a read-only rootfs container runc modifies the rootfs to add mountpoints which do not exist. This function also creates missing mountpoints as long as they are not on top of a tmpfs, as CRIU will restore tmpfs content anyway.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL