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>
This commit is contained in:
Daniel J Walsh
2022-01-06 10:42:34 -05:00
parent c0b3df8059
commit 13f3fd2555
4 changed files with 58 additions and 7 deletions

View File

@ -60,6 +60,9 @@ func (v *Volume) Inspect() (*define.InspectVolumeData, error) {
data.UID = v.uid()
data.GID = v.gid()
data.Anonymous = v.config.IsAnon
data.MountCount = v.state.MountCount
data.NeedsCopyUp = v.state.NeedsCopyUp
data.NeedsChown = v.state.NeedsChown
return data, nil
}