summaryrefslogtreecommitdiff
path: root/libpod/define
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-01-06 10:42:34 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2022-01-06 10:42:34 -0500
commit13f3fd2555b1f02af4c183ef51d1707af1198eb9 (patch)
tree385b25f04df21cf41537227494fd2fb166eca62b /libpod/define
parentc0b3df805999551db1da8ec2866457c555e627c7 (diff)
downloadpodman-13f3fd2555b1f02af4c183ef51d1707af1198eb9.tar.gz
podman-13f3fd2555b1f02af4c183ef51d1707af1198eb9.tar.bz2
podman-13f3fd2555b1f02af4c183ef51d1707af1198eb9.zip
Set volume NeedsCopyUp to false iff data was copied up
Currently Docker copies up the first volume on a mountpoint with data. Fixes: https://github.com/containers/podman/issues/12714 Also added NeedsCopyUP, NeedsChown and MountCount to the podman volume inspect code. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'libpod/define')
-rw-r--r--libpod/define/volume_inspect.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/libpod/define/volume_inspect.go b/libpod/define/volume_inspect.go
index 20602ea16..fac179176 100644
--- a/libpod/define/volume_inspect.go
+++ b/libpod/define/volume_inspect.go
@@ -48,4 +48,12 @@ type InspectVolumeData struct {
// volume for a specific container, and will be be removed when any
// container using it is removed.
Anonymous bool `json:"Anonymous,omitempty"`
+ // MountCount is the number of times this volume has been mounted.
+ MountCount uint `json:"MountCount"`
+ // NeedsCopyUp indicates that the next time the volume is mounted into
+ NeedsCopyUp bool `json:"NeedsCopyUp,omitempty"`
+ // NeedsChown indicates that the next time the volume is mounted into
+ // a container, the container will chown the volume to the container process
+ // UID/GID.
+ NeedsChown bool `json:"NeedsChown,omitempty"`
}