File: projectquota_unsupported.go

package info (click to toggle)
golang-github-containers-storage 1.59.1%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 4,184 kB
  • sloc: sh: 630; ansic: 389; makefile: 143; awk: 12
file content (36 lines) | stat: -rw-r--r-- 1,167 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//go:build !linux || exclude_disk_quota || !cgo

package quota

import (
	"errors"
)

// Quota limit params - currently we only control blocks hard limit
type Quota struct {
	Size   uint64
	Inodes uint64
}

// Control - Context to be used by storage driver (e.g. overlay)
// who wants to apply project quotas to container dirs
type Control struct{}

func NewControl(basePath string) (*Control, error) {
	return nil, errors.New("filesystem does not support, or has not enabled quotas")
}

// SetQuota - assign a unique project id to directory and set the quota limits
// for that project id
func (q *Control) SetQuota(targetPath string, quota Quota) error {
	return errors.New("filesystem does not support, or has not enabled quotas")
}

// GetQuota - get the quota limits of a directory that was configured with SetQuota
func (q *Control) GetQuota(targetPath string, quota *Quota) error {
	return errors.New("filesystem does not support, or has not enabled quotas")
}

// 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 (q *Control) ClearQuota(targetPath string) {}