aboutsummaryrefslogtreecommitdiff
path: root/libpod/container_api.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-07-30 09:04:18 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-01 17:53:30 +0000
commit8e1ef558eb324767ac46e452c80cc79f7ba2e9d2 (patch)
treeedfbbf2dee75ef08a7eb1a4139e3f2da3cf27ecf /libpod/container_api.go
parenta8ae7eae9c9e545b685abfd1e42a2a63cb547a80 (diff)
downloadpodman-8e1ef558eb324767ac46e452c80cc79f7ba2e9d2.tar.gz
podman-8e1ef558eb324767ac46e452c80cc79f7ba2e9d2.tar.bz2
podman-8e1ef558eb324767ac46e452c80cc79f7ba2e9d2.zip
Add --force to podman umount to force the unmounting of the rootfs
podman umount will currently only unmount file system if not other process is using it, otherwise the umount decrements the container storage to indicate that the caller is no longer using the mount point, once the count gets to 0, the file system is actually unmounted. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #1184 Approved by: TomSweeneyRedHat
Diffstat (limited to 'libpod/container_api.go')
-rw-r--r--libpod/container_api.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go
index b5104048e..73fd96960 100644
--- a/libpod/container_api.go
+++ b/libpod/container_api.go
@@ -441,7 +441,7 @@ func (c *Container) Mount() (string, error) {
}
// Unmount unmounts a container's filesystem on the host
-func (c *Container) Unmount() error {
+func (c *Container) Unmount(force bool) error {
if !c.batched {
c.lock.Lock()
defer c.lock.Unlock()
@@ -469,7 +469,7 @@ func (c *Container) Unmount() error {
return errors.Wrapf(err, "can't unmount %s last mount, it is still in use", c.ID())
}
}
- return c.unmount()
+ return c.unmount(force)
}
// Pause pauses a container