aboutsummaryrefslogtreecommitdiff
path: root/libpod/volume.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2022-04-28 11:39:12 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2022-04-28 13:29:01 +0200
commit91ead15283200feb9db8054a26d322fbfdc3fa59 (patch)
treeb839bbaa27a5bb4935786603e738b47bc1ea9d13 /libpod/volume.go
parent9133a6d044c0ab525cc087ca12c1bbc005f5f325 (diff)
downloadpodman-91ead15283200feb9db8054a26d322fbfdc3fa59.tar.gz
podman-91ead15283200feb9db8054a26d322fbfdc3fa59.tar.bz2
podman-91ead15283200feb9db8054a26d322fbfdc3fa59.zip
volume: add new option -o o=noquota
add a new option to completely disable xfs quota usage for a volume. xfs quota set on a volume, even just for tracking disk usage, can cause weird errors if the volume is later re-used by a container with a different quota projid. More specifically, link(2) and rename(2) might fail with EXDEV if the source file has a projid that is different from the parent directory. To prevent such kind of issues, the volume should be created beforehand with `podman volume create -o o=noquota $ID` Closes: https://github.com/containers/podman/issues/14049 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod/volume.go')
-rw-r--r--libpod/volume.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/libpod/volume.go b/libpod/volume.go
index bffafdc15..ab461a37f 100644
--- a/libpod/volume.go
+++ b/libpod/volume.go
@@ -52,6 +52,9 @@ type VolumeConfig struct {
Size uint64 `json:"size"`
// Inodes maximum of the volume.
Inodes uint64 `json:"inodes"`
+ // DisableQuota indicates that the volume should completely disable using any
+ // quota tracking.
+ DisableQuota bool `json:"disableQuota,omitempty"`
}
// VolumeState holds the volume's mutable state.