summaryrefslogtreecommitdiff
path: root/libpod/volume.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-09-10 22:24:43 +0200
committerGitHub <noreply@github.com>2019-09-10 22:24:43 +0200
commit997c4b56ed2121726e966afe9a102ed16ba78f93 (patch)
tree35a0b0a43f9c5b6d484f93564f01a373802e44df /libpod/volume.go
parentc1761ba1ac4155bab82fb9b847ccf96489b98265 (diff)
parentb6106341fb3a749ec37e59ee3290257a1729def1 (diff)
downloadpodman-997c4b56ed2121726e966afe9a102ed16ba78f93.tar.gz
podman-997c4b56ed2121726e966afe9a102ed16ba78f93.tar.bz2
podman-997c4b56ed2121726e966afe9a102ed16ba78f93.zip
Merge pull request #3961 from mheon/copy_volume_contents
When first mounting any named volume, copy up
Diffstat (limited to 'libpod/volume.go')
-rw-r--r--libpod/volume.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/libpod/volume.go b/libpod/volume.go
index b4de3aedc..c4771bbb8 100644
--- a/libpod/volume.go
+++ b/libpod/volume.go
@@ -57,6 +57,13 @@ type VolumeState struct {
// On incrementing from 0, the volume will be mounted on the host.
// On decrementing to 0, the volume will be unmounted on the host.
MountCount uint `json:"mountCount"`
+ // NeedsCopyUp indicates that the next time the volume is mounted into
+ // a container, the container will "copy up" the contents of the
+ // mountpoint into the volume.
+ // This should only be done once. As such, this is set at container
+ // create time, then cleared after the copy up is done and never set
+ // again.
+ NeedsCopyUp bool `json:"notYetMounted,omitempty"`
}
// Name retrieves the volume's name