See 'Mounts namespaces' under http://ckpt.wiki.kernel.org/index.php/LPC2009.
For private mounts namespaces inside a container we should be able to detect which mounts distinct from those in the container init's namespace. Recreating these mounts, including propagation info, should not be difficult.
The fuzzy part is what to do about mounts in the container init's namespace. It is not clear that there is a reliable way to
- detect what was mounted by the container init
- Do we compare to container_init->parent, which may have changed?
- Or against checkpointer's mounts, from which container mounts may not even be reachable?
- predict how the container init's mounts should be hooked into the system
We are safest punting on (2) and simply requiring that the container init's environment is recreated before calling sys_restart().
We can probably also safely punt on (1) in the same way. In particular:
- A container which was started using libvirt or lxc can recreate the same mounts as for the original container i.e. based on fstab
- For Custom HPC job, the software doing the checkpoint might analyze /proc/pid/mountinfo