File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change 1
- // +build linux
1
+ // +build linux,!exclude_disk_quota
2
2
3
3
//
4
4
// projectquota.go - implements XFS project quota controls
Original file line number Diff line number Diff line change
1
+ // +build linux,exclude_disk_quota
2
+
3
+ package quota
4
+
5
+ import (
6
+ "github.com/pkg/errors"
7
+ )
8
+
9
+ // Quota limit params - currently we only control blocks hard limit
10
+ type Quota struct {
11
+ Size uint64
12
+ }
13
+
14
+ // Control - Context to be used by storage driver (e.g. overlay)
15
+ // who wants to apply project quotas to container dirs
16
+ type Control struct {
17
+ }
18
+
19
+ var (
20
+ errQuotaNotSupported = errors .New ("filesystem does not support, or has not enabled quotas" )
21
+ )
22
+
23
+ func NewControl (basePath string ) (* Control , error ) {
24
+ return nil , errQuotaNotSupported
25
+ }
26
+
27
+ // SetQuota - assign a unique project id to directory and set the quota limits
28
+ // for that project id
29
+ func (q * Control ) SetQuota (targetPath string , quota Quota ) error {
30
+ return errQuotaNotSupported
31
+ }
32
+
33
+ // GetQuota - get the quota limits of a directory that was configured with SetQuota
34
+ func (q * Control ) GetQuota (targetPath string , quota * Quota ) error {
35
+ return errQuotaNotSupported
36
+ }
You can’t perform that action at this time.
0 commit comments