kubernetes/vendor/github.com/google/cadvisor/fs/fs.go

const LabelSystemRoot

const LabelDockerImages

const LabelCrioImages

const LabelCrioContainers

const DriverStatusPoolName

const DriverStatusDataLoopFile

const statBlockSize

const maxConcurrentOps

var pool

func init() {}

func claimToken() {}

func releaseToken() {}

type partition

type RealFsInfo

func NewFsInfo(context Context) (FsInfo, error) {}

// getFsUUIDToDeviceNameMap creates the filesystem uuid to device name map
// using the information in /dev/disk/by-uuid. If the directory does not exist,
// this function will return an empty map.
func getFsUUIDToDeviceNameMap() (map[string]string, error) {}

func processMounts(mounts []*mount.Info, excludedMountpointPrefixes []string) map[string]partition {}

// getDockerDeviceMapperInfo returns information about the devicemapper device and "partition" if
// docker is using devicemapper for its storage driver. If a loopback device is being used, don't
// return any information or error, as we want to report based on the actual partition where the
// loopback file resides, inside of the loopback file itself.
func (i *RealFsInfo) getDockerDeviceMapperInfo(context DockerContext) (string, *partition, error) {}

// addSystemRootLabel attempts to determine which device contains the mount for /.
func (i *RealFsInfo) addSystemRootLabel(mounts []*mount.Info) {}

// addDockerImagesLabel attempts to determine which device contains the mount for docker images.
func (i *RealFsInfo) addDockerImagesLabel(context Context, mounts []*mount.Info) {}

func (i *RealFsInfo) addCrioImagesLabel(context Context, mounts []*mount.Info) {}

// Generate a list of possible mount points for docker image management from the docker root directory.
// Right now, we look for each type of supported graph driver directories, but we can do better by parsing
// some of the context from `docker info`.
func getDockerImagePaths(context Context) map[string]struct{}

// This method compares the mountpoints with possible container image mount points. If a match is found,
// the label is added to the partition.
func (i *RealFsInfo) updateContainerImagesPath(label string, mounts []*mount.Info, containerImagePaths map[string]struct{}

func (i *RealFsInfo) GetDeviceForLabel(label string) (string, error) {}

func (i *RealFsInfo) GetLabelsForDevice(device string) ([]string, error) {}

func (i *RealFsInfo) GetMountpointForDevice(dev string) (string, error) {}

func (i *RealFsInfo) GetFsInfoForPath(mountSet map[string]struct{}

var partitionRegex

func getDiskStatsMap(diskStatsFile string) (map[string]DiskStats, error) {}

func (i *RealFsInfo) GetGlobalFsInfo() ([]Fs, error) {}

func major(devNumber uint64) uint {}

func minor(devNumber uint64) uint {}

func (i *RealFsInfo) GetDeviceInfoByFsUUID(uuid string) (*DeviceInfo, error) {}

func (i *RealFsInfo) mountInfoFromDir(dir string) (*mount.Info, bool) {}

func (i *RealFsInfo) GetDirFsDevice(dir string) (*DeviceInfo, error) {}

func GetDirUsage(dir string) (UsageInfo, error) {}

func (i *RealFsInfo) GetDirUsage(dir string) (UsageInfo, error) {}

func getVfsStats(path string) (total uint64, free uint64, avail uint64, inodes uint64, inodesFree uint64, err error) {}

// Devicemapper thin provisioning is detailed at
// https://www.kernel.org/doc/Documentation/device-mapper/thin-provisioning.txt
func dockerDMDevice(driverStatus map[string]string, dmsetup devicemapper.DmsetupClient) (string, uint, uint, uint, error) {}

// parseDMTable parses a single line of `dmsetup table` output and returns the
// major device, minor device, block size, and an error.
func parseDMTable(dmTable string) (uint, uint, uint, error) {}

func getDMStats(poolName string, dataBlkSize uint) (uint64, uint64, uint64, error) {}

func parseDMStatus(dmStatus string) (uint64, uint64, error) {}

// getZfstats returns ZFS mount stats using zfsutils
func getZfstats(poolName string) (uint64, uint64, uint64, error) {}

// Get major and minor Ids for a mount point using btrfs as filesystem.
func getBtrfsMajorMinorIds(mount *mount.Info) (int, int, error) {}