ios

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 24 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-2026, 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-2026, 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) 2025-2026, 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-2026, 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.

Index

Constants

View Source
const (
	FlagRotational = 1 << iota
	FlagNVMe
)

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) (int64, error)

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 DiskInfo added in v1.4.3

type DiskInfo struct {
	Size  uint32
	Flags uint32
}

type DiskStats

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

type FsDisks

type FsDisks map[string]DiskInfo // disk name => (sector size, flags)

func (FsDisks) ToSlice added in v1.3.24

func (fsdisks FsDisks) ToSlice() (out []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)
}

type MpathUtil

type MpathUtil sync.Map

func (*MpathUtil) Get

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

type RescanDisksResult added in v1.3.24

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

Jump to

Keyboard shortcuts

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