cr: add a comment about bind-mounting root in a tmp dir

Signed-off-by: Andrey Vagin <avagin@openvz.org>
This commit is contained in:
Andrey Vagin 2015-04-22 08:12:41 +03:00 committed by Michael Crosby
parent eaa35f552e
commit cbe747d989
1 changed files with 5 additions and 0 deletions

View File

@ -376,6 +376,11 @@ func (c *linuxContainer) Restore(process *Process, imagePath string) error {
}
defer imageDir.Close()
// CRIU has a few requirements for a root directory:
// * it must be a mount point
// * its parent must not be overmounted
// c.config.Rootfs is bind-mounted to a temporary directory
// to satisfy these requirements.
root := filepath.Join(c.root, "criu-root")
if err := os.Mkdir(root, 0755); err != nil {
return err