ios

package
v1.3.30 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2025 License: MIT Imports: 23 Imported by: 6

Documentation

Overview

Package ios is a collection of interfaces to the local storage subsystem; the package includes OS-dependent implementations for those interfaces.

  • Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.

Package ios is a collection of interfaces to the local storage subsystem; the package includes OS-dependent implementations for those interfaces.

  • Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.

Package ios is a collection of interfaces to the local storage subsystem; the package includes OS-dependent implementations for those interfaces.

  • Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.

Package ios is a collection of interfaces to the local storage subsystem; the package includes OS-dependent implementations for those interfaces.

  • Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.

Package ios is a collection of interfaces to the local storage subsystem; the package includes OS-dependent implementations for those interfaces.

  • Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.

Package ios is a collection of interfaces to the local storage subsystem; the package includes OS-dependent implementations for those interfaces.

  • Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.

Package ios is a collection of interfaces to the local storage subsystem; the package includes OS-dependent implementations for those interfaces.

  • Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirSizeOnDisk

func DirSizeOnDisk(dirPath string, withNonDirPrefix bool) (size uint64, err error)

DirSizeOnDisk calculates the total size of a directory on disk, including its subdirectories. TODO: We should also calculate and include `xattr` size.

func GetATime

func GetATime(osfi os.FileInfo) time.Time

func GetFSStats

func GetFSStats(path string) (blocks, bavail uint64, bsize int64, err error)

func GetFSUsedPercentage

func GetFSUsedPercentage(path string) (usedPercentage int64, ok bool)

func New

func New(num int) (IOS, BlockDevs)

Types

type AllDiskStats

type AllDiskStats map[string]DiskStats

type BlockDevs added in v1.3.28

type BlockDevs []*blockDev

type DiskStats

type DiskStats struct {
	RBps, Ravg, WBps, Wavg, Util int64
}

type FsDisks

type FsDisks map[string]int64 // disk name => sector size

public

func (FsDisks) ToSlice added in v1.3.24

func (fsdisks FsDisks) ToSlice() (disks []string)

type IOS added in v1.3.16

type IOS interface {
	GetAllMpathUtils() *MpathUtil
	GetMpathUtil(mpath string) int64
	AddMpath(mpath, fsname string, label cos.MountpathLabel, config *cmn.Config, blockDevs BlockDevs) (FsDisks, error)
	RescanDisks(mpath, fsname string, disks []string) RescanDisksResult
	RemoveMpath(mpath string, testingEnv bool)
	DiskStats(m cos.AllDiskStats)
}

public

type MpathUtil

type MpathUtil sync.Map

public

func (*MpathUtil) Get

func (x *MpathUtil) Get(mpath string) int64

func (*MpathUtil) Set

func (x *MpathUtil) Set(mpath string, util int64)

type RescanDisksResult added in v1.3.24

type RescanDisksResult struct {
	FsDisks  FsDisks
	Fatal    error
	Lost     []error
	Attached []error
}

public

Jump to

Keyboard shortcuts

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