mirror of
https://github.com/containers/podman.git
synced 2025-10-16 18:53:19 +08:00
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
This commit is contained in:

committed by
Atomic Bot

parent
a8ae7eae9c
commit
8e1ef558eb
@ -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
|
||||
|
Reference in New Issue
Block a user