quotactl

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Q_XQUOTAON = (('X' << 8) + (iota + 1)) << 8
	Q_XQUOTAOFF
	Q_XGETQUOTA
	Q_XSETQLIM
	Q_XGETQSTAT
	Q_XQUOTARM
	Q_XQUOTASYNC
	Q_XGETQSTATV
	Q_XGETNEXTQUOTA
)
View Source
const (
	FS_DQUOT_VERSION   = 1
	FS_QSTATV_VERSION1 = 1

	FS_DQ_ISOFT      = 1 << 0
	FS_DQ_IHARD      = 1 << 1
	FS_DQ_BSOFT      = 1 << 2
	FS_DQ_BHARD      = 1 << 3
	FS_DQ_RTBSOFT    = 1 << 4
	FS_DQ_RTBHARD    = 1 << 5
	FS_DQ_BTIMER     = 1 << 6
	FS_DQ_ITIMER     = 1 << 7
	FS_DQ_RTBTIMER   = 1 << 8
	FS_DQ_TIMER_MASK = FS_DQ_BTIMER | FS_DQ_ITIMER | FS_DQ_RTBTIMER
	FS_DQ_BWARNS     = 1 << 9
	FS_DQ_IWARNS     = 1 << 10
	FS_DQ_RTBWARNS   = 1 << 11
	FS_DQ_WARNS_MASK = FS_DQ_BWARNS | FS_DQ_IWARNS | FS_DQ_RTBWARNS
	FS_DQ_BCOUNT     = 1 << 12
	FS_DQ_ICOUNT     = 1 << 13
	FS_DQ_RTBCOUNT   = 1 << 14
	FS_DQ_ACCT_MASK  = FS_DQ_BCOUNT | FS_DQ_ICOUNT | FS_DQ_RTBCOUNT
)

Variables

View Source
var (
	IDNotFoundErr = errors.New("id not found")
)

Functions

func SetQuota

func SetQuota(fsPath string, quotaType QuotaType, dq *DiskQuota) error

SetQuota sets disk quota limits.

Types

type DiskQuota

type DiskQuota struct {
	Version        int8
	Flags          int8
	FieldMask      uint16
	ID             uint32
	BlkHardLimit   uint64
	BlkSoftLimit   uint64
	InodeHardLimit uint64
	INodeSoftLimit uint64
	BlocksCount    uint64
	InodeCount     uint64
	INodeTimer     int32
	BlockTimer     int32
	InodeWarnings  uint16
	BlockWarnings  uint16

	RTBlockHardLimit uint64
	RTBlockSoftLimit uint64
	RTBlocksCount    uint64
	RTBlockTimer     int32
	RTBlockWarnings  uint16
	// contains filtered or unexported fields
}

func GetQuota

func GetQuota(fsPath string, quotaType QuotaType, id uint32) (*DiskQuota, error)

GetQuota returns quota information for the provided ID and quota type.

type QuotaType

type QuotaType uint
const (
	QuotaTypeUser QuotaType = iota
	QuotaTypeGroup
	QuotaTypeProject
)

Jump to

Keyboard shortcuts

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