package quota
import "github.com/containers/storage/drivers/quota"
Index ¶
- Constants
- type Control
- func NewControl(basePath string) (*Control, error)
- func (q *Control) ClearQuota(targetPath string)
- func (q *Control) GetDiskUsage(targetPath string, usage *directory.DiskUsage) error
- func (q *Control) GetQuota(targetPath string, quota *Quota) error
- func (q *Control) SetQuota(targetPath string, quota Quota) error
- type Quota
Constants ¶
const BackingFsBlockDeviceLink = "backingFsBlockDev"
BackingFsBlockDeviceLink is the name of a file that we place in the home directory of a driver that uses this package.
Types ¶
type Control ¶
type Control struct {
// contains filtered or unexported fields
}
Control - Context to be used by storage driver (e.g. overlay) who wants to apply project quotas to container dirs
func NewControl ¶
Then try to create a test directory with the next project id and set a quota on it. If that works, continue to scan existing containers to map allocated project ids.
func (*Control) ClearQuota ¶
ClearQuota removes the map entry in the quotas map for targetPath. It does so to prevent the map leaking entries as directories are deleted.
func (*Control) GetDiskUsage ¶
GetDiskUsage - get the current disk usage of a directory that was configured with SetQuota
func (*Control) GetQuota ¶
GetQuota - get the quota limits of a directory that was configured with SetQuota
func (*Control) SetQuota ¶
SetQuota - assign a unique project id to directory and set the quota limits for that project id. targetPath must exist, must be a directory, and must be empty.
type Quota ¶
Quota limit params - currently we only control blocks hard limit and inodes
Source Files ¶
projectquota.go projectquota_supported.go
- Version
- v1.58.0 (latest)
- Published
- Apr 15, 2025
- Platform
- linux/amd64
- Imports
- 13 packages
- Last checked
- 13 hours ago –
Tools for package owners.