summaryrefslogtreecommitdiff
path: root/libpod/options.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-04-28 10:23:58 -0400
committerGitHub <noreply@github.com>2022-04-28 10:23:58 -0400
commitd0b96a541dc69e98d1923f8b297876f787bdb2db (patch)
tree77e4100a13bbb2a8f8149cee35c842a91b250c74 /libpod/options.go
parent2b8cafc0671fbbd155770f044b8216f050877192 (diff)
parent91ead15283200feb9db8054a26d322fbfdc3fa59 (diff)
downloadpodman-d0b96a541dc69e98d1923f8b297876f787bdb2db.tar.gz
podman-d0b96a541dc69e98d1923f8b297876f787bdb2db.tar.bz2
podman-d0b96a541dc69e98d1923f8b297876f787bdb2db.zip
Merge pull request #14051 from giuseppe/volume-create-noquota-option
volume: add new option -o o=noquota
Diffstat (limited to 'libpod/options.go')
-rw-r--r--libpod/options.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go
index 57e2d7cf6..98eb45e76 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -1634,6 +1634,19 @@ func WithVolumeNoChown() VolumeCreateOption {
}
}
+// WithVolumeDisableQuota prevents the volume from being assigned a quota.
+func WithVolumeDisableQuota() VolumeCreateOption {
+ return func(volume *Volume) error {
+ if volume.valid {
+ return define.ErrVolumeFinalized
+ }
+
+ volume.config.DisableQuota = true
+
+ return nil
+ }
+}
+
// withSetAnon sets a bool notifying libpod that this volume is anonymous and
// should be removed when containers using it are removed and volumes are
// specified for removal.