-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change backported from Moby. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
- Loading branch information
Showing
2 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// +build linux,exclude_disk_quota | ||
|
||
package quota | ||
|
||
import ( | ||
"github.com/pkg/errors" | ||
) | ||
|
||
// Quota limit params - currently we only control blocks hard limit | ||
type Quota struct { | ||
Size uint64 | ||
} | ||
|
||
// Control - Context to be used by storage driver (e.g. overlay) | ||
// who wants to apply project quotas to container dirs | ||
type Control struct { | ||
} | ||
|
||
var ( | ||
errQuotaNotSupported = errors.New("filesystem does not support, or has not enabled quotas") | ||
) | ||
|
||
func NewControl(basePath string) (*Control, error) { | ||
return nil, errQuotaNotSupported | ||
} | ||
|
||
// 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 errQuotaNotSupported | ||
} | ||
|
||
// GetQuota - get the quota limits of a directory that was configured with SetQuota | ||
func (q *Control) GetQuota(targetPath string, quota *Quota) error { | ||
return errQuotaNotSupported | ||
} |